Skip to content

Commit

Permalink
JsonResponse for arrays and scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
Zrnik committed Mar 18, 2024
1 parent e3e8203 commit 2a19b47
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Content/JsonResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
class JsonResponse
{
/**
* @param ResponseInterface $response
* @param object|array<mixed>|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();
Expand Down

0 comments on commit 2a19b47

Please sign in to comment.