Skip to content

Commit

Permalink
fix: "list" is reserved type (#8087)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jun 16, 2024
1 parent eb02ec7 commit 5f130a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tokenizer/Analyzer/Analysis/TypeAnalysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ final class TypeAnalysis implements StartEndTokenAwareAnalysis
*
* @see https://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.types
* @see https://php.net/manual/en/reserved.other-reserved-words.php
* @see https://php.net/manual/en/language.pseudo-types.php
*
* @var list<string>
*/
Expand All @@ -38,6 +37,7 @@ final class TypeAnalysis implements StartEndTokenAwareAnalysis
'float',
'int',
'iterable',
'list',
'mixed',
'never',
'null',
Expand Down
2 changes: 2 additions & 0 deletions tests/Tokenizer/Analyzer/Analysis/TypeAnalysisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public static function provideReservedCases(): iterable

yield ['iterable', true];

yield ['list', true];

yield ['mixed', true];

yield ['never', true];
Expand Down

0 comments on commit 5f130a1

Please sign in to comment.