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 ( 0dcb27...fb7903 )
by Mewes
11:26
created

DrawingNode   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 33
ccs 0
cts 23
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A compile() 0 14 1
A getAllowedParents() 0 9 1
1
<?php
2
3
namespace MewesK\TwigSpreadsheetBundle\Twig\Node;
4
5
/**
6
 * Class DrawingNode.
7
 */
8
class DrawingNode extends BaseNode
9
{
10
    /**
11
     * @param \Twig_Compiler $compiler
12
     */
13
    public function compile(\Twig_Compiler $compiler)
14
    {
15
        $compiler->addDebugInfo($this)
16
            ->write(self::CODE_FIX_CONTEXT)
17
            ->write('$drawingPath = ')
18
            ->subcompile($this->getNode('path'))
19
            ->raw(';'.PHP_EOL)
20
            ->write('$drawingProperties = ')
21
            ->subcompile($this->getNode('properties'))
22
            ->raw(';'.PHP_EOL)
23
            ->write(self::CODE_INSTANCE.'->startDrawing($drawingPath, $drawingProperties);'.PHP_EOL)
24
            ->write('unset($drawingPath, $drawingProperties);'.PHP_EOL)
25
            ->write(self::CODE_INSTANCE.'->endDrawing();'.PHP_EOL);
26
    }
27
28
    /**
29
     * @return string[]
30
     */
31
    public function getAllowedParents(): array
32
    {
33
        return [
34
            SheetNode::class,
35
            LeftNode::class,
36
            CenterNode::class,
37
            RightNode::class,
38
        ];
39
    }
40
}
41