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.
Completed
Push — master ( dea5e9...4057a0 )
by Mewes
02:21
created

DocumentTokenParser   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 3
dl 0
loc 61
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A configureParameters() 0 9 1
A getAttributes() 0 7 1
A getNode() 0 4 1
A getTag() 0 4 1
1
<?php
2
3
namespace MewesK\TwigSpreadsheetBundle\Twig\TokenParser;
4
5
use MewesK\TwigSpreadsheetBundle\Twig\Node\DocumentNode;
6
7
/**
8
 * Class DocumentTokenParser.
9
 */
10
class DocumentTokenParser extends BaseTokenParser
11
{
12
    /**
13
     * @var bool
14
     */
15
    private $preCalculateFormulas;
16
    /**
17
     * @var null|string
18
     */
19
    private $diskCachingDirectory;
20
21
    /**
22
     * @param bool        $preCalculateFormulas
23
     * @param null|string $diskCachingDirectory
24
     */
25
    public function __construct($preCalculateFormulas = true, $diskCachingDirectory = null)
26
    {
27
        $this->preCalculateFormulas = $preCalculateFormulas;
28
        $this->diskCachingDirectory = $diskCachingDirectory;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function configureParameters(\Twig_Token $token): array
35
    {
36
        return [
37
            'properties' => [
38
                'type' => self::PARAMETER_TYPE_ARRAY,
39
                'default' => new \Twig_Node_Expression_Array([], $token->getLine()),
40
            ],
41
        ];
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getAttributes(): array
48
    {
49
        return [
50
            'preCalculateFormulas' => $this->preCalculateFormulas,
51
            'diskCachingDirectory' => $this->diskCachingDirectory,
52
        ];
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function getNode(): string
59
    {
60
        return DocumentNode::class;
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66
    public function getTag()
67
    {
68
        return 'xlsdocument';
69
    }
70
}
71