Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | protected function doEnterNode(\Twig_Node $node, \Twig_Environment $env) |
||
18 | { |
||
19 | // Add 'spreadsheetWrapper' as argument on method/macro calls |
||
20 | if ($node instanceof \Twig_Node_Expression_MethodCall) { |
||
21 | /** |
||
22 | * @var \Twig_Node_Expression_Array $argumentsNode |
||
23 | */ |
||
24 | $argumentsNode = $node->getNode('arguments'); |
||
25 | $argumentsNode->addElement( |
||
26 | new \Twig_Node_Expression_Name(PhpSpreadsheetWrapper::INSTANCE_KEY, $node->getTemplateLine()), |
||
27 | new \Twig_Node_Expression_Constant(PhpSpreadsheetWrapper::INSTANCE_KEY, $node->getTemplateLine()) |
||
28 | ); |
||
29 | } |
||
30 | |||
31 | return $node; |
||
32 | } |
||
33 | |||
50 |