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