Refactor complex if statements to their own methods
Whenever you find yourself using || or && in an if statement, consider extracting the conditions of that if statement to a dedicated method with early returns. It's more readable and it makes debugging much easier.
— Freek Van der Herten (@freekmurze) September 12, 2018
Example: https://t.co/hUcq29uP54
Read more [twitter.com]