Conditions | 5 |
Paths | 4 |
Total Lines | 23 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 5.0729 |
Changes | 0 |
1 | <?php |
||
25 | 4 | protected function compile($expr, Context $context) |
|
26 | { |
||
27 | 4 | if ($expr->class instanceof Node\Name) { |
|
28 | 4 | $name = $expr->class->parts[0]; |
|
|
|||
29 | |||
30 | 4 | $arguments = []; |
|
31 | |||
32 | 4 | if (count($expr->args) > 0) { |
|
33 | 2 | foreach ($expr->args as $argument) { |
|
34 | 2 | $arguments[] = $context->getExpressionCompiler()->compile($argument->value); |
|
35 | 2 | } |
|
36 | 2 | } else { |
|
37 | 4 | if (class_exists($name, true)) { |
|
38 | 2 | return new CompiledExpression(CompiledExpression::OBJECT, new $name()); |
|
39 | } |
||
40 | } |
||
41 | |||
42 | 2 | return new CompiledExpression(CompiledExpression::OBJECT); |
|
43 | } |
||
44 | |||
45 | $context->debug('Unknown how to pass new', $expr); |
||
46 | return new CompiledExpression(); |
||
47 | } |
||
48 | } |
||
49 |
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.