Skip to content

Commit 79f8698

Browse files
committed
change is_a in ObjectTypeComparator
1 parent 22e41e5 commit 79f8698

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/TypeDeclaration/TypeAnalyzer/ObjectTypeComparator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function isCurrentObjectTypeSubType(Type $currentType, Type $newType): bo
3737
return false;
3838
}
3939

40-
return is_a($currentType->getClassName(), $newType->getClassName(), true);
40+
return $newType->isSuperTypeOf($currentType)->yes();
4141
}
4242

4343
private function isClosure(Type $type): bool

0 commit comments

Comments
 (0)