- Why flat is better than nested
- How to resolve
Others have covered this better than I can:
- https://en.wikibooks.org/wiki/Computer_Programming/Coding_Style/Minimize_nesting
- https://medium.com/@ankushchoubey/clean-code-1-flat-is-better-than-nested-leave-when-not-okay-c09ba74090ef
- https://medium.com/@jnlewis/how-to-write-clean-deeply-nested-if-else-statements-579d29043f9a
- Intellij can auto-invert some conditionals