| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 5 | public function pass(Return_ $stmt, Context $context) |
|
| 22 | { |
||
| 23 | // this is not the value null but "no value" |
||
| 24 | 5 | if ($stmt->expr === null) { |
|
| 25 | 1 | $context->notice( |
|
| 26 | 1 | 'return.void', |
|
| 27 | 1 | 'You are trying to return void', |
|
| 28 | $stmt |
||
| 29 | 1 | ); |
|
| 30 | |||
| 31 | 1 | return true; |
|
| 32 | } |
||
| 33 | |||
| 34 | 5 | return false; |
|
| 35 | } |
||
| 36 | |||
| 47 |