| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 11 | public function pass(Expr\UnaryPlus $expr, Context $context) |
|
| 22 | { |
||
| 23 | 11 | if (get_class($expr->expr) != get_class($expr)) { |
|
| 24 | 11 | $context->notice( |
|
| 25 | 11 | 'stupid_unary_operators', |
|
| 26 | 11 | 'Better to use type casting then unary plus.', |
|
| 27 | 11 | $expr |
|
| 28 | ); |
||
| 29 | 11 | return true; |
|
| 30 | } |
||
| 31 | |||
| 32 | 1 | return false; |
|
| 33 | } |
||
| 34 | |||
| 45 |