From 813e779e1c0422e282f10a7852bdd8306e8c7624 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 15 Jan 2021 08:38:00 +1030 Subject: [PATCH] Typehint response --- src/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions.php b/src/functions.php index 0092773..4729ea1 100644 --- a/src/functions.php +++ b/src/functions.php @@ -17,7 +17,7 @@ use Nyholm\Psr7\Response; use Nyholm\Psr7\Stream; use Tobyz\JsonApiServer\Schema\Field; -function json_api_response(JsonSerializable $document, int $status = 200) +function json_api_response(JsonSerializable $document, int $status = 200): Response { return (new Response($status)) ->withHeader('content-type', JsonApi::MEDIA_TYPE)