Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
8 | final class Word extends Token |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $domain; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $word; |
||
20 | |||
21 | /** |
||
22 | 376 | * @var Flags|null |
|
23 | */ |
||
24 | 376 | private $flags; |
|
25 | 376 | ||
26 | |||
27 | 376 | public function __construct(string $lexeme, int $position, string $domain, string $word, ?Flags $flags = null) |
|
28 | 376 | { |
|
29 | $this->domain = $domain; |
||
30 | $this->word = $word; |
||
31 | 134 | $this->flags = $flags; |
|
32 | |||
33 | 134 | parent::__construct(Tokenizer::TOKEN_TERM, $lexeme, $position); |
|
34 | } |
||
35 | |||
36 | |||
37 | 134 | public function getDomain(): string |
|
40 | } |
||
41 | |||
42 | |||
43 | public function getWord(): string |
||
44 | { |
||
45 | return $this->word; |
||
46 | } |
||
47 | |||
48 | |||
49 | public function getFlags(): ?Flags |
||
52 | } |
||
53 | |||
54 | } |
||
55 |