Skip to content

Commit

Permalink
change is_a in ObjectTypeComparator
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Mar 19, 2021
1 parent 22e41e5 commit 79f8698
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function isCurrentObjectTypeSubType(Type $currentType, Type $newType): bo
return false;
}

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

private function isClosure(Type $type): bool
Expand Down

0 comments on commit 79f8698

Please sign in to comment.