We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a405e10 commit 64021cbCopy full SHA for 64021cb
src/Locator.php
@@ -65,6 +65,9 @@ public function getClassName(string $filename) : ?string
65
}
66
continue;
67
68
+ if ($token[0] === \T_RETURN) {
69
+ return null;
70
+ }
71
if (\in_array($token[0], [
72
\T_CLASS,
73
\T_ENUM,
@@ -74,9 +77,6 @@ public function getClassName(string $filename) : ?string
74
77
for ($next = $current + 1; $next < $last; $next++) {
75
78
if ($tokens[$next] === '{') {
76
79
$token = $tokens[$current + 2];
- if ( ! isset($token[1])) {
- return null;
- }
80
$class = $namespace . '\\' . $token[1];
81
break 2;
82
0 commit comments