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