| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 3 | protected function compile($expr, Context $context) |
|
| 23 | { |
||
| 24 | 3 | if ($expr->left instanceof Variable) { |
|
| 25 | 3 | $variable = $context->getSymbol((string)$expr->left->name); |
|
| 26 | |||
| 27 | 3 | if ($variable) { |
|
| 28 | 2 | $variable->incUse(); |
|
| 29 | |||
| 30 | 2 | if ($variable->getValue() !== null) { |
|
| 31 | 1 | $leftCompiled = $context->getExpressionCompiler()->compile($expr->left); |
|
| 32 | 1 | return CompiledExpression::fromZvalValue($leftCompiled->getValue()); |
|
| 33 | } |
||
| 34 | 1 | } |
|
| 35 | 2 | } |
|
| 36 | 2 | $rightCompiled = $context->getExpressionCompiler()->compile($expr->right); |
|
| 37 | 2 | return CompiledExpression::fromZvalValue($rightCompiled->getValue()); |
|
| 38 | } |
||
| 39 | } |
||
| 40 |