| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5.1576 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 1 | public function compile($stmt, Context $context) |
|
| 19 | { |
||
| 20 | 1 | $compiler = $context->getExpressionCompiler(); |
|
| 21 | |||
| 22 | 1 | if ($stmt->num !== null) { |
|
| 23 | 1 | $compiled = $compiler->compile($stmt->num); |
|
| 24 | |||
| 25 | 1 | if (!($stmt->num instanceof LNumber) || $compiled->getValue() == 0) { |
|
| 26 | $context->notice( |
||
| 27 | 'language_error', |
||
| 28 | 'Continue only supports positive integers.', |
||
| 29 | $stmt |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | 1 | } |
|
| 33 | 1 | } |
|
| 34 | } |
||
| 35 |