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