| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 3.0032 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 2 | public function pass($stmt, Context $context) |
|
| 19 | { |
||
| 20 | 2 | if ($stmt instanceof Stmt\Label) { |
|
| 21 | 2 | $context->notice( |
|
| 22 | 2 | 'do_not_use_labels', |
|
| 23 | 2 | 'Do not use labels', |
|
| 24 | $stmt |
||
| 25 | 2 | ); |
|
| 26 | 2 | return true; |
|
| 27 | 2 | } elseif ($stmt instanceof Stmt\Goto_) { |
|
| 28 | 2 | $context->notice( |
|
| 29 | 2 | 'do_not_use_goto', |
|
| 30 | 2 | 'Do not use goto statements', |
|
| 31 | $stmt |
||
| 32 | 2 | ); |
|
| 33 | 2 | return true; |
|
| 34 | } |
||
| 35 | return false; |
||
| 36 | } |
||
| 37 | |||
| 61 |