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
Pull Request — master (#23)
by
unknown
03:46
created

DocumentNode   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 30
ccs 17
cts 17
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A compile() 0 16 1
A getAllowedParents() 0 4 1
1
<?php
2
3
namespace MyWheels\TwigSpreadsheetBundle\Twig\Node;
4
5
use MyWheels\TwigSpreadsheetBundle\Wrapper\PhpSpreadsheetWrapper;
6
7
/**
8
 * Class DocumentNode.
9
 */
10
class DocumentNode extends BaseNode
11
{
12
    /**
13
     * @param \Twig_Compiler $compiler
14
     */
15 31
    public function compile(\Twig_Compiler $compiler)
16
    {
17 31
        $compiler->addDebugInfo($this)
18 31
            ->write("ob_start();\n")
19 31
            ->write(self::CODE_INSTANCE.' = new '.PhpSpreadsheetWrapper::class.'($context, $this->env, ')
20 31
                ->repr($this->attributes)
21 31
            ->raw(');'.PHP_EOL)
22 31
            ->write(self::CODE_INSTANCE.'->startDocument(')
23 31
                ->subcompile($this->getNode('properties'))
24 31
            ->raw(');'.PHP_EOL)
25 31
            ->subcompile($this->getNode('body'))
26 31
            ->addDebugInfo($this)
27 31
            ->write("ob_end_clean();\n")
28 31
            ->write(self::CODE_INSTANCE.'->endDocument();'.PHP_EOL)
29 31
            ->write('unset('.self::CODE_INSTANCE.');'.PHP_EOL);
30 31
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35 4
    public function getAllowedParents(): array
36
    {
37 4
        return [];
38
    }
39
}
40