ovr/phpsa

[Analyzer] Nested Ternary

Closed this issue · 1 comments

Check for something like this:

$x = ($a == 1) ? 2 : (($b == 2) ? 3 : 4);

and notice:
Nested ternary operators can be confusing. Use if/elseif instead.

ovr commented

Implemented by @ddmler in 8fc0ecf