Skip to content

Commit 979d006

Browse files
committed
Hotfix: PHP 7.4 fn closure Return type hint tokens
For type hints and return type we usually have T_STRING, but we have couple different tokens, and these are: - T_CALLABLE - T_PARENT - T_SELF We need to skip them here.
1 parent afb3f14 commit 979d006

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Tokenizers/PHP.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,9 @@ protected function processAdditional()
17121712
T_COLON => T_COLON,
17131713
T_NS_SEPARATOR => T_NS_SEPARATOR,
17141714
T_NULLABLE => T_NULLABLE,
1715+
T_CALLABLE => T_CALLABLE,
1716+
T_PARENT => T_PARENT,
1717+
T_SELF => T_SELF,
17151718
];
17161719

17171720
$closer = $this->tokens[$x]['parenthesis_closer'];

0 commit comments

Comments
 (0)