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 ( 8182e1...f8e5a3 )
by Mewes
02:18
created

DocumentNode::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 4
1
<?php
2
3
namespace MewesK\TwigSpreadsheetBundle\Twig\Node;
4
5
use MewesK\TwigSpreadsheetBundle\Wrapper\PhpSpreadsheetWrapper;
6
7
/**
8
 * Class DocumentNode.
9
 */
10
class DocumentNode extends BaseNode
11
{
12
    /**
13
     * @param \Twig_Compiler $compiler
14
     */
15
    public function compile(\Twig_Compiler $compiler)
16
    {
17
        $compiler->addDebugInfo($this)
18
            ->write("ob_start();\n")
19
            ->write('$documentProperties = ')
20
            ->subcompile($this->getNode('properties'))
21
            ->raw(';'.PHP_EOL)
22
            ->write(self::CODE_INSTANCE.' = new '.PhpSpreadsheetWrapper::class.'($context, $this->env);'.PHP_EOL)
23
            ->write(self::CODE_INSTANCE.'->startDocument($documentProperties);'.PHP_EOL)
24
            ->write('unset($documentProperties);'.PHP_EOL)
25
            ->subcompile($this->getNode('body'))
26
            ->addDebugInfo($this)
27
            ->write("ob_end_clean();\n")
28
            ->write(self::CODE_INSTANCE.'->endDocument('.
29
                ($this->getAttribute('preCalculateFormulas') ? 'true' : 'false').', '.
30
                ($this->getAttribute('diskCachingDirectory') ? '\''.$this->getAttribute('diskCachingDirectory').'\'' : 'null').');'.PHP_EOL)
31
            ->write('unset('.self::CODE_INSTANCE.');'.PHP_EOL);
32
    }
33
34
    /**
35
     * @return string[]
36
     */
37
    public function getAllowedParents(): array
38
    {
39
        return [];
40
    }
41
}
42