GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Failed
Pull Request — master (#23)
by
unknown
04:37 queued 19s
created

MacroContextNodeVisitor   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 5
dl 0
loc 41
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPriority() 0 4 1
A doEnterNode() 0 19 2
A doLeaveNode() 0 4 1
1
<?php
2
3
namespace MyWheels\TwigSpreadsheetBundle\Twig\NodeVisitor;
4
5
use MyWheels\TwigSpreadsheetBundle\Wrapper\PhpSpreadsheetWrapper;
6
7
/**
8
 * Class MacroContextNodeVisitor.
9
 */
10
class MacroContextNodeVisitor extends \Twig_BaseNodeVisitor
0 ignored issues
show
Deprecated Code introduced by
The class Twig_BaseNodeVisitor has been deprecated with message: since Twig 2.7, use "Twig\NodeVisitor\AbstractNodeVisitor" instead

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.

Loading history...
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15 51
    public function getPriority()
16
    {
17 51
        return 0;
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
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());
0 ignored issues
show
Deprecated Code introduced by
The class Twig_Node_Expression_Constant has been deprecated with message: since Twig 2.7, use "Twig\Node\Expression\ConstantExpression" instead

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.

Loading history...
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());
0 ignored issues
show
Deprecated Code introduced by
The class Twig_Node_Expression_Name has been deprecated with message: since Twig 2.7, use "Twig\Node\Expression\NameExpression" instead

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.

Loading history...
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
43
    /**
44
     * {@inheritdoc}
45
     */
46 51
    protected function doLeaveNode(\Twig_Node $node, \Twig_Environment $env)
47
    {
48 51
        return $node;
49
    }
50
}
51