-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: extract token types for PHPStan #8925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
150556b
to
f3eb691
Compare
This reverts commit 2452f84.
@@ -220,7 +222,7 @@ private function moveMethodElement(array $elements, string $nameKeep, string $na | |||
|
|||
/** | |||
* @return list<array{ | |||
* array{int, string}, | |||
* _PhpTokenArray, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a token array, it is a tuple of an index and a name.
@@ -256,7 +258,7 @@ private function getDataProvidersWithUsagePairs(Tokens $tokens, int $startIndex, | |||
|
|||
/** | |||
* @param list<array{ | |||
* array{int, string}, | |||
* _PhpTokenArray, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here the same
@@ -98,7 +101,7 @@ public function testGetContent(int $index, string $content): void | |||
} | |||
|
|||
/** | |||
* @return iterable<int, array{int, string}> | |||
* @return iterable<int, _PhpTokenArray> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a token array
@@ -161,7 +164,7 @@ public function testGetTag(int $index, string $tag): void | |||
} | |||
|
|||
/** | |||
* @return iterable<int, array{int, string}> | |||
* @return iterable<int, _PhpTokenArray> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a token array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gharlan , feel free to simply send a PR, if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do so tomorrow
@@ -140,7 +143,7 @@ public function testStartOrEndPos(int $pos, string $content): void | |||
} | |||
|
|||
/** | |||
* @return iterable<int, array{int, string}> | |||
* @return iterable<int, _PhpTokenArray> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a token array
@@ -1171,7 +1174,7 @@ private static function makeLongArrayShapeType(): string | |||
/** | |||
* Return type is recursive. | |||
* | |||
* @return list<array{int, string}|list<mixed>> | |||
* @return list<_PhpTokenArray|list<mixed>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a token array
extracted from #8242