diff --git a/src/Assert.php b/src/Assert.php index c87fbf4..6834e5c 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -571,7 +571,7 @@ public static function isAOf(mixed $value, mixed $class, string $message = ''): static::string($class, 'Expected class as a string. Got: %s'); if (!\is_a($value, $class, \is_string($value))) { - static::reportInvalidArgument(sprintf( + static::reportInvalidArgument(\sprintf( $message ?: 'Expected an instance of this class or to this class among its parents "%2$s". Got: %s', static::valueToString($value), $class @@ -599,7 +599,7 @@ public static function isNotA(mixed $value, mixed $class, string $message = ''): static::string($class, 'Expected class as a string. Got: %s'); if (\is_a($value, $class, \is_string($value))) { - static::reportInvalidArgument(sprintf( + static::reportInvalidArgument(\sprintf( $message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s', static::valueToString($value), $class @@ -631,7 +631,7 @@ public static function isAnyOf(mixed $value, mixed $classes, string $message = ' } } - static::reportInvalidArgument(sprintf( + static::reportInvalidArgument(\sprintf( $message ?: 'Expected an instance of any of this classes or any of those classes among their parents "%2$s". Got: %s', static::valueToString($value), \implode(', ', \iterator_to_array($classes))