| Conditions | 9 | 
| Paths | 21 | 
| Total Lines | 23 | 
| Code Lines | 17 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 18 | 
| CRAP Score | 9 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 21 | 20 | protected function compile($expr, Context $context) | |
| 22 |     { | ||
| 23 | 20 | $left = $context->getExpressionCompiler()->compile($expr->var); | |
| 24 | 20 | $expExpression = $context->getExpressionCompiler()->compile($expr->expr); | |
| 25 | |||
| 26 | 20 |         switch ($left->getType()) { | |
| 27 | 20 | case CompiledExpression::INTEGER: | |
| 28 | 20 | case CompiledExpression::DOUBLE: | |
| 29 | 20 | case CompiledExpression::NUMBER: | |
| 30 | 20 | case CompiledExpression::BOOLEAN: | |
| 31 | 19 |                 switch ($expExpression->getType()) { | |
| 32 | 19 | case CompiledExpression::INTEGER: | |
| 33 | 19 | case CompiledExpression::DOUBLE: | |
| 34 | 19 | case CompiledExpression::NUMBER: | |
| 35 | 19 | case CompiledExpression::BOOLEAN: | |
| 36 | 18 | return CompiledExpression::fromZvalValue($left->getValue() * $expExpression->getValue()); | |
| 37 | break; | ||
|  | |||
| 38 | 1 | } | |
| 39 | 1 | break; | |
| 40 | 2 | } | |
| 41 | |||
| 42 | 2 | return new CompiledExpression(CompiledExpression::UNKNOWN); | |
| 43 | } | ||
| 44 | } | ||
| 45 | 
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.