| @@ -30,20 +30,22 @@ | ||
| 30 | 30 | public const TYPE_HASH = 'hash'; |
| 31 | 31 | public const TYPE_NUMBER = 'number'; |
| 32 | 32 | public const TYPE_STRING = 'string'; |
| 33 | 33 | |
| 34 | - private ?string $type; | |
| 35 | - private ?string $value; | |
| 36 | - private ?int $position; | |
| 37 | - | |
| 38 | - public function __construct(?string $type, ?string $value, ?int $position) | |
| 39 | - { | |
| 40 | - $this->type = $type; | |
| 41 | - $this->value = $value; | |
| 42 | - $this->position = $position; | |
| 34 | + /** | |
| 35 | + * @param self::TYPE_*|null $type | |
| 36 | + */ | |
| 37 | + public function __construct( | |
| 38 | + private ?string $type, | |
| 39 | + private ?string $value, | |
| 40 | + private ?int $position, | |
| 41 | + ) { | |
| 43 | 42 | } |
| 44 | 43 | |
| 45 | - public function getType(): ?int | |
| 44 | + /** | |
| 45 | + * @return self::TYPE_*|null | |
| 46 | + */ | |
| 47 | + public function getType(): ?string | |
| 46 | 48 | { |
| 47 | 49 | return $this->type; |
| 48 | 50 | } |
| 49 | 51 | |
| @@ -71,9 +73,9 @@ | ||
| 71 | 73 | if (!$values) { |
| 72 | 74 | return true; |
| 73 | 75 | } |
| 74 | 76 | |
| 75 | - return \in_array($this->value, $values); | |
| 77 | + return \in_array($this->value, $values, true); | |
| 76 | 78 | } |
| 77 | 79 | |
| 78 | 80 | public function isWhitespace(): bool |
| 79 | 81 | { |