phpcheckstyle
phpcheckstyle copied to clipboard
Check for nested ternary statements
Being able to warn about nested ternary statements would be useful.
For example:
(1 === TRUE ? "Yay" : "Nay")
Would be fine, however:
(1 === TRUE ? ( 0 === FALSE ? "Foo" : "Bar" ) : "Nay")
Should report a warning that too many ternary statements are nested.