Skip to content

Commit 80b0d3f

Browse files
minor #513 More precise phpdocs in PhpToken (staabm)
This PR was merged into the 1.x branch. Discussion ---------- More precise phpdocs in PhpToken analog nikic/PHP-Parser#1058 Commits ------- f160585 More precise phpdocs in PhpToken
2 parents 48780e2 + f160585 commit 80b0d3f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Php80/PhpToken.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PhpToken implements \Stringable
2929
public $text;
3030

3131
/**
32-
* @var int
32+
* @var -1|positive-int
3333
*/
3434
public $line;
3535

@@ -38,6 +38,9 @@ class PhpToken implements \Stringable
3838
*/
3939
public $pos;
4040

41+
/**
42+
* @param -1|positive-int $line
43+
*/
4144
public function __construct(int $id, string $text, int $line = -1, int $position = -1)
4245
{
4346
$this->id = $id;
@@ -80,7 +83,7 @@ public function __toString(): string
8083
}
8184

8285
/**
83-
* @return static[]
86+
* @return list<static>
8487
*/
8588
public static function tokenize(string $code, int $flags = 0): array
8689
{

0 commit comments

Comments
 (0)