From a6e69350955e2954915fb813863775f34383357e Mon Sep 17 00:00:00 2001 From: Dalibor Korpar Date: Thu, 14 Mar 2024 08:20:30 +0100 Subject: [PATCH] fix: allways return string if cannot determine value in request hydrator --- src/Helpers/RequestHydrator.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Helpers/RequestHydrator.php b/src/Helpers/RequestHydrator.php index cef34f7..73859a5 100644 --- a/src/Helpers/RequestHydrator.php +++ b/src/Helpers/RequestHydrator.php @@ -34,11 +34,7 @@ public static function castValueToBuiltInType(mixed $value, string $type, bool $ return new DateTimeImmutable($value); //@phpstan-ignore-line default: - if (!is_scalar($value)) { - return null; - } - - return (string) $value; + return (string) $value; //@phpstan-ignore-line } }