| 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 |
||
| 20 | 1 | public function pass($stmt, Context $context) |
|
| 21 | { |
||
| 22 | 1 | if ($stmt instanceof Label) { |
|
| 23 | 1 | $context->notice( |
|
| 24 | 1 | 'do_not_use_goto', |
|
| 25 | 1 | 'Do not use labels', |
|
| 26 | $stmt |
||
| 27 | 1 | ); |
|
| 28 | 1 | return true; |
|
| 29 | 1 | } elseif ($stmt instanceof Goto_) { |
|
| 30 | 1 | $context->notice( |
|
| 31 | 1 | 'do_not_use_goto', |
|
| 32 | 1 | 'Do not use goto statements', |
|
| 33 | $stmt |
||
| 34 | 1 | ); |
|
| 35 | 1 | return true; |
|
| 36 | } |
||
| 37 | return false; |
||
| 38 | } |
||
| 39 | |||
| 63 |