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