Completed
Push — master ( 1a3ff8...fe80fb )
by Nikola
02:47
created

Node::getExecutionPriority()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/*
3
 * This file is part of the Twig Bufferized Template package, an RunOpenCode project.
4
 *
5
 * (c) 2017 RunOpenCode
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace RunOpenCode\Twig\BufferizedTemplate\Tag\Bufferize;
11
12
/**
13
 * Class Node
14
 *
15
 * Bufferize node denotes node in AST which ought to be buffered.
16
 *
17
 * @package RunOpenCode\Twig\BufferizedTemplate\Tag\Bufferize
18
 *
19
 * @internal
20
 */
21
final class Node extends \Twig_Node
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26 4
    public function compile(\Twig_Compiler $compiler)
27
    {
28
        $compiler
29 4
            ->addDebugInfo($this)
30 4
            ->write("\n");
31
32 4
        $compiler->subcompile($this->getNode('body'));
33 4
    }
34
35 4
    public function getExecutionPriority()
36
    {
37 4
        return $this->getAttribute('execution_priority');
38
    }
39
}
40