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