diff --git a/src/Assert.php b/src/Assert.php index f82ee5b..c87fbf4 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -1740,7 +1740,11 @@ public static function implementsInterface(mixed $value, mixed $interface, strin { static::objectish($value); - if (!\in_array($interface, \class_implements($value), true)) { + $implements = \class_implements($value); + + static::isArray($implements); + + if (!\in_array($interface, $implements, true)) { static::reportInvalidArgument(\sprintf( $message ?: 'Expected an implementation of %2$s. Got: %s', static::valueToString($value),