phpcheckstyle icon indicating copy to clipboard operation
phpcheckstyle copied to clipboard

Check for nested ternary statements

Open jbrooksuk opened this issue 11 years ago • 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.

jbrooksuk avatar Sep 08 '14 08:09 jbrooksuk