mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
cleanup
This commit is contained in:
parent
51e9f2776e
commit
9f359d5847
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user