SyntaxTree   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 48
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCorrections() 0 3 1
A getTokenSequence() 0 3 1
A __construct() 0 5 1
A getRootNode() 0 3 1
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