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