From f160585005ef3a6b114b3f0a31f1b9a72d8f9d21 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 2 Jan 2025 09:10:11 +0100 Subject: [PATCH] More precise phpdocs in PhpToken --- src/Php80/PhpToken.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Php80/PhpToken.php b/src/Php80/PhpToken.php index fe6e69105..cd78c4ccc 100644 --- a/src/Php80/PhpToken.php +++ b/src/Php80/PhpToken.php @@ -29,7 +29,7 @@ class PhpToken implements \Stringable public $text; /** - * @var int + * @var -1|positive-int */ public $line; @@ -38,6 +38,9 @@ class PhpToken implements \Stringable */ public $pos; + /** + * @param -1|positive-int $line + */ public function __construct(int $id, string $text, int $line = -1, int $position = -1) { $this->id = $id; @@ -80,7 +83,7 @@ public function __toString(): string } /** - * @return static[] + * @return list */ public static function tokenize(string $code, int $flags = 0): array {