diff --git a/src/Type/ObjectType.php b/src/Type/ObjectType.php index 7f18546d3e..1fd2236087 100644 --- a/src/Type/ObjectType.php +++ b/src/Type/ObjectType.php @@ -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()), ); }