Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
23 | 51 | protected function doEnterNode(\Twig_Node $node, \Twig_Environment $env) |
|
24 | { |
||
25 | // add wrapper instance as argument on all method calls |
||
26 | 51 | if ($node instanceof \Twig_Node_Expression_MethodCall) { |
|
27 | 1 | $keyNode = new \Twig_Node_Expression_Constant(PhpSpreadsheetWrapper::INSTANCE_KEY, $node->getTemplateLine()); |
|
28 | |||
29 | // add wrapper even if it not exists, we fix that later |
||
30 | 1 | $valueNode = new \Twig_Node_Expression_Name(PhpSpreadsheetWrapper::INSTANCE_KEY, $node->getTemplateLine()); |
|
31 | 1 | $valueNode->setAttribute('ignore_strict_check', true); |
|
32 | |||
33 | /** |
||
34 | * @var \Twig_Node_Expression_Array $argumentsNode |
||
35 | */ |
||
36 | 1 | $argumentsNode = $node->getNode('arguments'); |
|
37 | 1 | $argumentsNode->addElement($valueNode, $keyNode); |
|
38 | } |
||
39 | |||
40 | 51 | return $node; |
|
41 | } |
||
42 | |||
51 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.