From 76b68ed38f8edccab3ddae460b76bff7eba89b50 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sun, 24 Nov 2024 15:11:41 +0700 Subject: [PATCH] fix --- .../PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php b/src/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php index de05b91f6b3..3630accd57f 100644 --- a/src/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php +++ b/src/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php @@ -22,6 +22,7 @@ use Rector\PhpDocParser\PhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor; use Rector\Renaming\Collector\RenamedNameCollector; use Rector\StaticTypeMapper\StaticTypeMapper; +use Rector\StaticTypeMapper\ValueObject\Type\AliasedObjectType; use Rector\StaticTypeMapper\ValueObject\Type\ShortenedObjectType; final class ClassRenamePhpDocNodeVisitor extends AbstractPhpDocNodeVisitor @@ -134,8 +135,8 @@ private function resolveNamespacedName( return $name; } - if ($staticType instanceof ShortenedObjectType) { - return $name; + if ($staticType instanceof ShortenedObjectType || $staticType instanceof AliasedObjectType) { + return $staticType->getFullyQualifiedName(); } $uses = $this->useImportsResolver->resolve();