architv / soccer-cli

:soccer: Football scores for hackers. :computer: A command line interface for all the football scores.
MIT License
1.09k stars 220 forks source link

Change conditional to be more readable #64

Closed Saturn closed 8 years ago

Saturn commented 8 years ago

Really long conditionals are hard to read in my opinion. This sets all the league position properties into variables with short names and uses those instead.

This makes the conditional lines quite short and I think possibly makes it more clear what the purpose is.

The conditional line went from about 109 characters across to ~57.

I think this works better than splitting the conditionals into multiple lines.