Total Complexity | 4 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 81.82% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
5 | class Token |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * @var int |
||
10 | */ |
||
11 | private $type; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $lexeme; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $position; |
||
22 | |||
23 | |||
24 | 511 | public function __construct(int $type, string $lexeme, int $position) |
|
25 | { |
||
26 | 511 | $this->type = $type; |
|
27 | 511 | $this->lexeme = $lexeme; |
|
28 | 511 | $this->position = $position; |
|
29 | 511 | } |
|
30 | |||
31 | |||
32 | 134 | public function getType(): int |
|
33 | { |
||
34 | 134 | return $this->type; |
|
35 | } |
||
36 | |||
37 | |||
38 | 504 | public function getLexeme(): string |
|
39 | { |
||
40 | 504 | return $this->lexeme; |
|
41 | } |
||
42 | |||
43 | |||
44 | public function getPosition(): int |
||
47 | } |
||
48 | |||
49 | } |
||
50 |