diff --git a/src/Util/MultiInstanceofChecker.php b/src/Util/MultiInstanceofChecker.php index 1449e790608..1a99a7ca305 100644 --- a/src/Util/MultiInstanceofChecker.php +++ b/src/Util/MultiInstanceofChecker.php @@ -9,10 +9,10 @@ final class MultiInstanceofChecker /** * @param array $types */ - public function isInstanceOf(object | string $object, array $types): bool + public function isInstanceOf(object $object, array $types): bool { foreach ($types as $type) { - if (is_a($object, $type, true)) { + if ($object instanceof $type) { return true; } }