Skip to content

Commit

Permalink
fxi
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jun 10, 2022
1 parent ef97b13 commit fdecce8
Showing 1 changed file with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,24 @@ private function resolveNamespacedName(

$nameFromUse = $this->resolveNamefromUse($uses, $name);

if ($nameFromUse === $name) {
$staticType = $this->staticTypeMapper->mapPHPStanPhpDocTypeNodeToPHPStanType(
$identifierTypeNode,
$phpParserNode
);
if (! $staticType instanceof ObjectType) {
return $nameFromUse;
}
if ($nameFromUse !== $name) {
return $nameFromUse;
}

if ($staticType instanceof ShortenedObjectType) {
return $nameFromUse;
}
$staticType = $this->staticTypeMapper->mapPHPStanPhpDocTypeNodeToPHPStanType(
$identifierTypeNode,
$phpParserNode
);

$nameFromUse = $namespaceName . '\\' . $nameFromUse;
if (! $staticType instanceof ObjectType) {
return $nameFromUse;
}

if ($staticType instanceof ShortenedObjectType) {
return $nameFromUse;
}

return $nameFromUse;
return $namespaceName . '\\' . $nameFromUse;
}

/**
Expand Down

0 comments on commit fdecce8

Please sign in to comment.