| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 5 | class Token |
||
| 6 | { |
||
| 7 | private ?int $tokenType; |
||
| 8 | private string $value; |
||
| 9 | |||
| 10 | 17 | public function __construct(?int $tokenType, string $value) |
|
| 11 | { |
||
| 12 | 17 | $this->tokenType = $tokenType; |
|
| 13 | 17 | $this->value = $value; |
|
| 14 | 17 | } |
|
| 15 | |||
| 16 | 13 | public function getTokenType(): ?int |
|
| 17 | { |
||
| 18 | 13 | return $this->tokenType; |
|
| 19 | } |
||
| 20 | |||
| 21 | 13 | public function getValue(): string |
|
| 22 | { |
||
| 23 | 13 | return $this->value; |
|
| 24 | } |
||
| 25 | |||
| 26 | 17 | public static function of(?int $tokenType, string $value): static |
|
| 29 | } |
||
| 30 | } |
||
| 31 |