Group   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 68
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 68
ccs 19
cts 19
cp 1
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setNodes() 0 3 1
A getTokenLeft() 0 3 1
A setTokenRight() 0 3 1
A getNodes() 0 3 1
A setTokenLeft() 0 3 1
A getTokenRight() 0 3 1
1
<?php declare(strict_types = 1);
2
3
namespace Apicart\FQL\Token\Node;
4
5
use Apicart\FQL\Token\Token\GroupBegin;
6
use Apicart\FQL\Value\AbstractNode;
7
use Apicart\FQL\Value\Token;
8
9
final class Group extends AbstractNode
10
{
11
12
    /**
13
     * @var AbstractNode[]
14
     */
15
    private $nodes = [];
16
17
    /**
18
     * @var GroupBegin|null
19
     */
20
    private $tokenLeft;
21
22
    /**
23
     * @var Token|null
24
     */
25
    private $tokenRight;
26
27
28
    /**
29
     * @param AbstractNode[] $nodes
30
     */
31 53
    public function __construct(array $nodes = [], ?GroupBegin $tokenLeft = null, ?Token $tokenRight = null) {
32 53
        $this->nodes = $nodes;
33 53
        $this->tokenLeft = $tokenLeft;
34 53
        $this->tokenRight = $tokenRight;
35 53
    }
36
37
38
    /**
39
     * @return AbstractNode[]
40
     */
41 25
    public function getNodes(): array
42
    {
43 25
        return $this->nodes;
44
    }
45
46
47
    /**
48
     * @param AbstractNode[] $nodes
49
     */
50 24
    public function setNodes(array $nodes): void
51
    {
52 24
        $this->nodes = $nodes;
53 24
    }
54
55
56 24
    public function getTokenLeft(): ?GroupBegin
57
    {
58 24
        return $this->tokenLeft;
59
    }
60
61
62 24
    public function setTokenLeft(?GroupBegin $tokenLeft): void
63
    {
64 24
        $this->tokenLeft = $tokenLeft;
65 24
    }
66
67
68 24
    public function getTokenRight(): ?Token
69
    {
70 24
        return $this->tokenRight;
71
    }
72
73
74 24
    public function setTokenRight(?Token $tokenRight): void
75
    {
76 24
        $this->tokenRight = $tokenRight;
77 24
    }
78
79
}
80