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 ( b5b947...dea5e9 )
by Mewes
12:02
created

XlsDrawingNode::canContainText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace MewesK\TwigSpreadsheetBundle\Twig\Node;
4
5
use MewesK\TwigSpreadsheetBundle\Wrapper\PhpSpreadsheetWrapper;
6
7
/**
8
 * Class XlsDrawingNode
9
 *
10
 * @package MewesK\TwigSpreadsheetBundle\Twig\Node
11
 */
12
class XlsDrawingNode extends SyntaxAwareNode
13
{
14
    /**
15
     * @param \Twig_Node_Expression $path
16
     * @param \Twig_Node_Expression $properties
17
     * @param int $line
18
     * @param string $tag
19
     */
20
    public function __construct(\Twig_Node_Expression $path, \Twig_Node_Expression $properties, $line = 0, $tag = 'xlsdrawing')
21
    {
22
        parent::__construct(['path' => $path, 'properties' => $properties], [], $line, $tag);
23
    }
24
25
    /**
26
     * @param \Twig_Compiler $compiler
27
     */
28
    public function compile(\Twig_Compiler $compiler)
29
    {
30
        $compiler->addDebugInfo($this)
31
            ->write('$context = ' . PhpSpreadsheetWrapper::class . '::fixContext($context);' . PHP_EOL)
32
            ->write('$drawingPath = ')
33
            ->subcompile($this->getNode('path'))
34
            ->raw(';' . PHP_EOL)
35
            ->write('$drawingProperties = ')
36
            ->subcompile($this->getNode('properties'))
37
            ->raw(';' . PHP_EOL)
38
            ->write('$context[\'' . PhpSpreadsheetWrapper::INSTANCE_KEY . '\']->startDrawing($drawingPath, $drawingProperties);' . PHP_EOL)
39
            ->write('unset($drawingPath, $drawingProperties);' . PHP_EOL)
40
            ->write('$context[\'' . PhpSpreadsheetWrapper::INSTANCE_KEY . '\']->endDrawing();' . PHP_EOL);
41
    }
42
43
    /**
44
     * @return string[]
45
     */
46
    public function getAllowedParents(): array
47
    {
48
        return [
49
            XlsSheetNode::class,
50
            XlsLeftNode::class,
51
            XlsCenterNode::class,
52
            XlsRightNode::class
53
        ];
54
    }
55
}
56