We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JsonSerializable
Json
1 parent 0c03385 commit 930e7eeCopy full SHA for 930e7ee
packages/http/src/Responses/Json.php
@@ -4,6 +4,7 @@
4
5
namespace Tempest\Http\Responses;
6
7
+use JsonSerializable;
8
use Tempest\Http\Header;
9
use Tempest\Http\IsResponse;
10
use Tempest\Http\Response;
@@ -13,7 +14,7 @@ final class Json implements Response
13
14
{
15
use IsResponse;
16
- public function __construct(?array $body = null)
17
+ public function __construct(JsonSerializable|array|null $body = null)
18
19
$this->status = Status::OK;
20
$this->body = $body;
0 commit comments