| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 4.5435 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | 5 | public function resolveFunctionName(FuncCall $funcCall, Context $context) |
|
| 21 | { |
||
| 22 | 5 | $funcNameCompiledExpression = $context->getExpressionCompiler()->compile($funcCall->name); |
|
|
|
|||
| 23 | |||
| 24 | 5 | if ($funcNameCompiledExpression->isString() && $funcNameCompiledExpression->isCorrectValue()) { |
|
| 25 | 5 | return $funcNameCompiledExpression->getValue(); |
|
| 26 | } else { |
||
| 27 | $context->debug( |
||
| 28 | 'Unexpected function name type ' . $funcNameCompiledExpression->getType(), |
||
| 29 | $funcCall->name |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | |||
| 33 | return false; |
||
| 34 | } |
||
| 35 | |||
| 49 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.