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 Setup Failed
Push — master ( 78f8b7...0f754d )
by Elemér
04:15
created

DocumentTokenParser::configureParameters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 9
Ratio 100 %

Importance

Changes 0
Metric Value
dl 9
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Erelke\TwigSpreadsheetBundle\Twig\TokenParser;
4
5
use Erelke\TwigSpreadsheetBundle\Twig\Node\DocumentNode;
6
use Twig\Node\Node as Twig_Node;
7
use Twig\Node\Expression\ArrayExpression as Twig_Node_Expression_Array;
8
use Twig\Token as Twig_Token;
9
10
/**
11
 * Class DocumentTokenParser.
12
 */
13 View Code Duplication
class DocumentTokenParser extends BaseTokenParser
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function configureParameters(Twig_Token $token): array
19
    {
20
        return [
21
            'properties' => [
22
                'type' => self::PARAMETER_TYPE_ARRAY,
23
                'default' => new Twig_Node_Expression_Array([], $token->getLine()),
24
            ],
25
        ];
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function createNode(array $nodes = [], int $lineNo = 0): Twig_Node
32
    {
33
        return new DocumentNode($nodes, $this->getAttributes(), $lineNo, $this->getTag());
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function getTag()
40
    {
41
        return 'xlsdocument';
42
    }
43
}
44