diff --git a/src/Annotation/Parser.php b/src/Annotation/Parser.php index cf0a374..0ed4c66 100644 --- a/src/Annotation/Parser.php +++ b/src/Annotation/Parser.php @@ -549,8 +549,11 @@ public static function getFileDeclareClass(string $file): ?string for ($j = $i + 1; $j < count($tokens); $j++) { if ($tokens[$j] === '{') { $class = $tokens[$i + 2][1]; + break; } } + }elseif ($class){ + break; } } if (!empty($class)) {