Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 24, 2024
1 parent 1e1d65e commit 19431d5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/PHPStanStaticTypeMapper/TypeMapper/ObjectTypeMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,10 @@ public function mapToPhpParserNode(Type $type, string $typeKind): ?Node
return new Name('self');
}

if ($type instanceof ShortenedObjectType) {
if ($type instanceof ShortenedObjectType || $type instanceof AliasedObjectType) {
return new FullyQualified($type->getFullyQualifiedName());
}

if ($type instanceof AliasedObjectType) {
return new Name($type->getClassName());
}

if ($type instanceof FullyQualifiedObjectType) {
$className = $type->getClassName();

Expand Down

0 comments on commit 19431d5

Please sign in to comment.