From 2a19b4764da2f402d3e2728b9698fb51764ae454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Zrn=C3=ADk?= Date: Mon, 18 Mar 2024 20:10:01 +0100 Subject: [PATCH] JsonResponse for arrays and scalars --- src/Content/JsonResponse.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Content/JsonResponse.php b/src/Content/JsonResponse.php index 5dd9905..b6b850e 100644 --- a/src/Content/JsonResponse.php +++ b/src/Content/JsonResponse.php @@ -11,11 +11,15 @@ class JsonResponse { /** + * @param ResponseInterface $response + * @param object|array|scalar|null $responseSchema + * @return ResponseInterface * @throws JsonException + * @noinspection PhpPluralMixedCanBeReplacedWithArrayInspection */ public static function of( ResponseInterface $response, - object $responseSchema, + object|array|string|int|float|bool|null $responseSchema, ): ResponseInterface { $psr17Factory = new Psr17Factory();