From a462fe1539a6553af26583fc99f09dfb33b49959 Mon Sep 17 00:00:00 2001 From: Romain Canon Date: Mon, 25 Dec 2023 23:30:24 +0100 Subject: [PATCH] fix: properly parse class name in same single-namespace --- src/Type/Parser/Lexer/AliasLexer.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Type/Parser/Lexer/AliasLexer.php b/src/Type/Parser/Lexer/AliasLexer.php index d5320a30..192bf2df 100644 --- a/src/Type/Parser/Lexer/AliasLexer.php +++ b/src/Type/Parser/Lexer/AliasLexer.php @@ -80,17 +80,7 @@ private function resolveAlias(string $symbol): string private function resolveNamespaced(string $symbol): string { - $reflection = $this->reflection; - - if ($reflection instanceof ReflectionFunction) { - $reflection = $reflection->getClosureScopeClass(); - } - - if (! $reflection) { - return $symbol; - } - - $namespace = $reflection->getNamespaceName(); + $namespace = $this->reflection->getNamespaceName(); if (! $namespace) { return $symbol;