Skip to content

Commit

Permalink
Fix subclass acceptability when class alias is involved on "ours" side
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Oct 17, 2023
1 parent 0228643 commit d5c599c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Type/ObjectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,12 @@ private function checkSubclassAcceptability(string $thatClass): AcceptsResult

if ($thisReflection->isInterface() && $thatReflection->isInterface()) {
return AcceptsResult::createFromBoolean(
$thatReflection->implementsInterface($this->className),
$thatReflection->implementsInterface($thisReflection->getName()),
);
}

return AcceptsResult::createFromBoolean(
$thatReflection->isSubclassOf($this->className),
$thatReflection->isSubclassOf($thisReflection->getName()),
);
}

Expand Down

0 comments on commit d5c599c

Please sign in to comment.