LogicalOr   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Test Coverage

Coverage 61.9%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 65
ccs 13
cts 21
cp 0.619
rs 10
wmc 8

8 Methods

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