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
Branch travis (c4fbe0)
by Mewes
03:50
created

HeaderFooterNode::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 5
1
<?php
2
3
namespace MewesK\TwigSpreadsheetBundle\Twig\Node;
4
5
use MewesK\TwigSpreadsheetBundle\Wrapper\HeaderFooterWrapper;
6
7
/**
8
 * Class HeaderFooterNode.
9
 */
10
class HeaderFooterNode extends BaseNode
11
{
12
    /**
13
     * @var string
14
     */
15
    private $baseType;
16
17
    /**
18
     * HeaderFooterNode constructor.
19
     *
20
     * @param array       $nodes
21
     * @param array       $attributes
22
     * @param int         $lineNo
23
     * @param string|null $tag
24
     * @param string      $baseType
25
     *
26
     * @throws \InvalidArgumentException
27
     */
28
    public function __construct(array $nodes = [], array $attributes = [], int $lineNo = 0, string $tag = null, string $baseType = HeaderFooterWrapper::BASETYPE_HEADER)
29
    {
30
        parent::__construct($nodes, $attributes, $lineNo, $tag);
31
32
        $this->baseType = HeaderFooterWrapper::validateBaseType(strtolower($baseType));
33
    }
34
35
    /**
36
     * @param \Twig_Compiler $compiler
37
     */
38
    public function compile(\Twig_Compiler $compiler)
39
    {
40
        $compiler->addDebugInfo($this)
41
            ->write(self::CODE_FIX_CONTEXT)
42
            ->write('$headerFooterType = ')
43
            ->subcompile($this->getNode('type'))
44
            ->raw(';'.PHP_EOL)
45
            ->write('$headerFooterProperties = ')
46
            ->subcompile($this->getNode('properties'))
47
            ->raw(';'.PHP_EOL)
48
            ->write(self::CODE_INSTANCE.'->startHeaderFooter(\''.$this->baseType.'\', $headerFooterType, $headerFooterProperties);'.PHP_EOL)
49
            ->write('unset($headerFooterType, $headerFooterProperties);'.PHP_EOL)
50
            ->subcompile($this->getNode('body'))
51
            ->addDebugInfo($this)
52
            ->write(self::CODE_INSTANCE.'->endHeaderFooter();'.PHP_EOL);
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function getAllowedParents(): array
59
    {
60
        return [
61
            SheetNode::class,
62
        ];
63
    }
64
}
65