SyntaxTree::getRootNode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php declare(strict_types = 1);
2
3
namespace Apicart\FQL\Value;
4
5
class SyntaxTree
6
{
7
8
    /**
9
     * @var Correction[]
10
     */
11
    private $corrections = [];
12
13
    /**
14
     * @var AbstractNode
15
     */
16
    private $rootNode;
17
18
    /**
19
     * @var TokenSequence
20
     */
21
    private $tokenSequence;
22
23
24
    /**
25
     * @param Correction[] $corrections
26
     */
27 135
    public function __construct(AbstractNode $rootNode, TokenSequence $tokenSequence, array $corrections)
28
    {
29 135
        $this->rootNode = $rootNode;
30 135
        $this->tokenSequence = $tokenSequence;
31 135
        $this->corrections = $corrections;
32 135
    }
33
34
35 135
    public function getRootNode(): AbstractNode
36
    {
37 135
        return $this->rootNode;
38
    }
39
40
41 134
    public function getTokenSequence(): TokenSequence
42
    {
43 134
        return $this->tokenSequence;
44
    }
45
46
47
    /**
48
     * @return Correction[]
49
     */
50 134
    public function getCorrections(): array
51
    {
52 134
        return $this->corrections;
53
    }
54
55
}
56