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

AlignmentTokenParser::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Erelke\TwigSpreadsheetBundle\Twig\TokenParser;
4
5
use Erelke\TwigSpreadsheetBundle\Twig\Node\AlignmentNode;
6
use Erelke\TwigSpreadsheetBundle\Wrapper\HeaderFooterWrapper;
7
use InvalidArgumentException;
8
use Twig\Node\Node as Twig_Node;
9
10
/**
11
 * Class AlignmentTokenParser.
12
 */
13
class AlignmentTokenParser extends BaseTokenParser
14
{
15
    /**
16
     * @var string
17
     */
18
    private $alignment;
19
20
    /**
21
     * AlignmentTokenParser constructor.
22
     *
23
     * @param array  $attributes optional attributes for the corresponding node
24
     * @param string $alignment
25
     *
26
     * @throws InvalidArgumentException
27
     */
28
    public function __construct(array $attributes = [], string $alignment = HeaderFooterWrapper::ALIGNMENT_CENTER)
29
    {
30
        parent::__construct($attributes);
31
32
        $this->alignment = HeaderFooterWrapper::validateAlignment(strtolower($alignment));
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     *
38
     * @throws InvalidArgumentException
39
     */
40
    public function createNode(array $nodes = [], int $lineNo = 0): Twig_Node
41
    {
42
        return new AlignmentNode($nodes, $this->getAttributes(), $lineNo, $this->getTag(), $this->alignment);
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    public function getTag()
49
    {
50
        return 'xls'.$this->alignment;
51
    }
52
}
53