This commit is contained in:
TomasVotruba 2020-02-10 01:24:01 +01:00
parent 51e9f2776e
commit 9f359d5847

View File

@ -176,7 +176,7 @@ final class NodeTypeResolver
*/ */
public function isNullableType(Node $node): bool public function isNullableType(Node $node): bool
{ {
$nodeType = $this->getStaticType($node); $nodeType = $this->resolve($node);
if (! $nodeType instanceof UnionType) { if (! $nodeType instanceof UnionType) {
return false; return false;
} }
@ -266,7 +266,7 @@ final class NodeTypeResolver
)); ));
} }
return is_a($this->getStaticType($node), $staticTypeClass); return is_a($this->resolve($node), $staticTypeClass);
} }
private function addPerNodeTypeResolver(PerNodeTypeResolverInterface $perNodeTypeResolver): void private function addPerNodeTypeResolver(PerNodeTypeResolverInterface $perNodeTypeResolver): void
@ -403,7 +403,7 @@ final class NodeTypeResolver
private function getVendorPropertyFetchType(PropertyFetch $propertyFetch): ?Type private function getVendorPropertyFetchType(PropertyFetch $propertyFetch): ?Type
{ {
$varObjectType = $this->getStaticType($propertyFetch->var); $varObjectType = $this->resolve($propertyFetch->var);
if (! $varObjectType instanceof TypeWithClassName) { if (! $varObjectType instanceof TypeWithClassName) {
return null; return null;
} }