| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function pass(Expr\Ternary $expr, Context $context) |
||
| 22 | { |
||
| 23 | if ($expr->if instanceof Expr\Ternary || $expr->else instanceof Expr\Ternary) { |
||
| 24 | $context->notice( |
||
| 25 | 'nested_ternary', |
||
| 26 | 'Nested ternaries are confusing you should use if instead.', |
||
| 27 | $expr |
||
| 28 | ); |
||
| 29 | |||
| 30 | return true; |
||
| 31 | } |
||
| 32 | |||
| 33 | return false; |
||
| 34 | } |
||
| 35 | |||
| 46 |