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

XlsRightNode::canContainText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
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 XlsRightNode
9
 *
10
 * @package MewesK\TwigSpreadsheetBundle\Twig\Node
11
 */
12
class XlsRightNode extends SyntaxAwareNode
13
{
14
    /**
15
     * @param \Twig_Node $body
16
     * @param int $line
17
     * @param string $tag
18
     */
19
    public function __construct(\Twig_Node $body, $line = 0, $tag = 'xlsright')
20
    {
21
        parent::__construct(['body' => $body], [], $line, $tag);
22
    }
23
24
    /**
25
     * @param \Twig_Compiler $compiler
26
     */
27
    public function compile(\Twig_Compiler $compiler)
28
    {
29
        $compiler->addDebugInfo($this)
30
            ->write('$context = ' . PhpSpreadsheetWrapper::class . '::fixContext($context);' . PHP_EOL)
31
            ->write('$context[\'' . PhpSpreadsheetWrapper::INSTANCE_KEY . '\']->startAlignment(\'right\');' . PHP_EOL)
32
            ->write("ob_start();\n")
33
            ->subcompile($this->getNode('body'))
34
            ->write('$rightValue = trim(ob_get_clean());' . PHP_EOL)
35
            ->write('$context[\'' . PhpSpreadsheetWrapper::INSTANCE_KEY . '\']->endAlignment($rightValue);' . PHP_EOL)
36
            ->write('unset($rightValue);' . PHP_EOL);
37
    }
38
39
    /**
40
     * @return string[]
41
     */
42
    public function getAllowedParents(): array
43
    {
44
        return [
45
            XlsFooterNode::class,
46
            XlsHeaderNode::class
47
        ];
48
    }
49
}
50