| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function pass($stmt, Context $context) |
||
| 26 | { |
||
| 27 | if ($stmt->default instanceof Node\Expr) { |
||
| 28 | $compiled = $context->getExpressionCompiler()->compile($stmt->default); |
||
| 29 | if ($compiled->getType() == CompiledExpression::NULL) { |
||
| 30 | $context->notice( |
||
| 31 | 'property_definition_default_value', |
||
| 32 | 'null is default and is not needed.', |
||
| 33 | $stmt |
||
| 34 | ); |
||
| 35 | return true; |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | return false; |
||
| 40 | } |
||
| 41 | |||
| 52 |