From 3f82b6f772b0393c115f788cbfec8d807206deaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 19 Apr 2021 17:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Http/Response.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HttpServer/Http/Response.php b/HttpServer/Http/Response.php index dc289229..f68be584 100644 --- a/HttpServer/Http/Response.php +++ b/HttpServer/Http/Response.php @@ -273,13 +273,13 @@ class Response extends HttpService * @param null $response * @return mixed */ - public static function create($response = null): mixed + public static function create($response = null): static { - $ciResponse = Context::setContext('response', new Response()); + $ciResponse = new Response(); $ciResponse->response = $response; $ciResponse->startTime = microtime(true); $ciResponse->format = self::JSON; - return $ciResponse; + return Context::setContext('response', $ciResponse); }