Mandatory::getOperand()   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\Token\Node;
4
5
use Apicart\FQL\Value\AbstractNode;
6
use Apicart\FQL\Value\Token;
7
8
final class Mandatory extends AbstractNode
9
{
10
11
    /**
12
     * @var AbstractNode
13
     */
14
    private $operand;
15
16
    /**
17
     * @var Token
18
     */
19
    private $token;
20
21
22 26
    public function __construct(AbstractNode $operand, Token $token)
23
    {
24 26
        $this->operand = $operand;
25 26
        $this->token = $token;
26 26
    }
27
28
29 1
    public function getNodes(): array
30
    {
31 1
        return [$this->getOperand()];
32
    }
33
34
35 26
    public function getOperand(): AbstractNode
36
    {
37 26
        return $this->operand;
38
    }
39
40
41
    public function setOperand(AbstractNode $operand): void
42
    {
43
        $this->operand = $operand;
44
    }
45
46
47 25
    public function getToken(): Token
48
    {
49 25
        return $this->token;
50
    }
51
52
53
    public function setToken(Token $token): void
54
    {
55
        $this->token = $token;
56
    }
57
58
}
59