| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | */ |
| 29 | 29 | public $text; |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | - * @var int | |
| 32 | + * @var -1|positive-int | |
| 33 | 33 | */ |
| 34 | 34 | public $line; |
| 35 | 35 | |
| 36 | 36 | /** |
| @@ -37,8 +37,11 @@ | ||
| 37 | 37 | * @var int |
| 38 | 38 | */ |
| 39 | 39 | public $pos; |
| 40 | 40 | |
| 41 | + /** | |
| 42 | + * @param -1|positive-int $line | |
| 43 | + */ | |
| 41 | 44 | public function __construct(int $id, string $text, int $line = -1, int $position = -1) |
| 42 | 45 | { |
| 43 | 46 | $this->id = $id; |
| 44 | 47 | $this->text = $text; |
| @@ -79,9 +82,9 @@ | ||
| 79 | 82 | return (string) $this->text; |
| 80 | 83 | } |
| 81 | 84 | |
| 82 | 85 | /** |
| 83 | - * @return static[] | |
| 86 | + * @return list<static> | |
| 84 | 87 | */ |
| 85 | 88 | public static function tokenize(string $code, int $flags = 0): array |
| 86 | 89 | { |
| 87 | 90 | $line = 1; |