Passed
Push — master ( 44c68b...bebfba )
by Tomáš
10:58
created

Phrase::getFlags()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 0
cts 0
cp 0
crap 2
1
<?php declare(strict_types = 1);
2
3
namespace Apicart\FQL\Token\Token;
4
5
use Apicart\FQL\Tokenizer\Tokenizer;
6
use Apicart\FQL\Value\Token;
7
8
final class Phrase extends Token
9
{
10
11
    /**
12
     * @var string|null
13
     */
14
    private $domain;
15
16
    /**
17
     * @var string
18
     */
19
    private $quote;
20
21
    /**
22
     * @var string
23
     */
24
    private $phrase;
25
26
    /**
27 22
     * @var Flags|null
28
     */
29 22
    private $flags;
30 22
31 22
32
    public function __construct(
33 22
        string $lexeme,
34 22
        int $position,
35
        string $domain,
36
        string $quote,
37 2
        string $phrase,
38
        ?Flags $flags = null
39 2
    )
40
    {
41
        $this->domain = $domain;
42
        $this->quote = $quote;
43 2
        $this->phrase = $phrase;
44
        $this->flags = $flags;
45 2
46
        parent::__construct(Tokenizer::TOKEN_TERM, $lexeme, $position);
47
    }
48
49 2
50
    public function getDomain(): ?string
51 2
    {
52
        return $this->domain;
53
    }
54
55
56
    public function getQuote(): string
57
    {
58
        return $this->quote;
59
    }
60
61
62
    public function getPhrase(): string
63
    {
64
        return $this->phrase;
65
    }
66
67
68
    public function getFlags(): ?Flags
69
    {
70
        return $this->flags;
71
    }
72
73
}
74