diff --git a/src/Tokenizers/PHP.php b/src/Tokenizers/PHP.php index 02f6fcc9bd..5fa3b1cfc2 100644 --- a/src/Tokenizers/PHP.php +++ b/src/Tokenizers/PHP.php @@ -1254,7 +1254,7 @@ protected function tokenize($string) // Get the next non-whitespace token. for ($i = ($stackPtr + 1); $i < $numTokens; $i++) { if (is_array($tokens[$i]) === false - || isset(Util\Tokens::$emptyTokens[$tokens[$i][0]]) === false + || isset(Tokens::$emptyTokens[$tokens[$i][0]]) === false ) { break; } @@ -1284,7 +1284,7 @@ protected function tokenize($string) $tokenType = $tokens[$i]; } - if (isset(Util\Tokens::$emptyTokens[$tokenType]) === true) { + if (isset(Tokens::$emptyTokens[$tokenType]) === true) { continue; } diff --git a/tests/Core/Tokenizer/BackfillReadonlyTest.inc b/tests/Core/Tokenizer/BackfillReadonlyTest.inc index 1e66d4643b..b371f7d4f7 100644 --- a/tests/Core/Tokenizer/BackfillReadonlyTest.inc +++ b/tests/Core/Tokenizer/BackfillReadonlyTest.inc @@ -88,8 +88,6 @@ namespace My\Readonly\Collection; $var = readonly($a, $b); /* testReadonlyAsNamespacedFunctionCall */ $var = My\NS\readonly($a, $b); -/* testReadonlyAsNamespaceRelativeFunctionCall */ -$var = namespace\ReadOnly($a, $b); /* testReadonlyAsMethodCall */ $var = $obj->readonly($a, $b); /* testReadonlyAsNullsafeMethodCall */ diff --git a/tests/Core/Tokenizer/BackfillReadonlyTest.php b/tests/Core/Tokenizer/BackfillReadonlyTest.php index dd57c9188d..6b29d1c9ac 100644 --- a/tests/Core/Tokenizer/BackfillReadonlyTest.php +++ b/tests/Core/Tokenizer/BackfillReadonlyTest.php @@ -264,11 +264,7 @@ public function dataNotReadonly() ], [ '/* testReadonlyAsNamespacedFunctionCall */', - 'readonly', - ], - [ - '/* testReadonlyAsNamespaceRelativeFunctionCall */', - 'ReadOnly', + 'My\NS\readonly', ], [ '/* testReadonlyAsMethodCall */',