| Conditions | 5 |
| Paths | 7 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | protected function compile($expr, Context $context) |
||
| 29 | { |
||
| 30 | $left = $context->getExpressionCompiler()->compile($expr->left); |
||
| 31 | $right = $context->getExpressionCompiler()->compile($expr->right); |
||
| 32 | |||
| 33 | switch ($left->getType()) { |
||
| 34 | case CompiledExpression::INTEGER: |
||
| 35 | case CompiledExpression::DOUBLE: |
||
| 36 | switch ($right->getType()) { |
||
| 37 | case CompiledExpression::INTEGER: |
||
| 38 | case CompiledExpression::DOUBLE: |
||
| 39 | return new CompiledExpression( |
||
| 40 | CompiledExpression::BOOLEAN, |
||
| 41 | $this->compare($left->getValue(), $right->getValue()) |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | break; |
||
| 45 | } |
||
| 46 | |||
| 47 | return new CompiledExpression(CompiledExpression::BOOLEAN); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |