PHPCheckstyle/phpcheckstyle

Check for nested ternary statements

Opened this issue · 0 comments

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.