From 3bfbdbff9fa6117b1d23020b05ccfe5479358d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 17 Oct 2023 14:58:25 +0800 Subject: [PATCH] eee --- src/Format/ArrayFormat.php | 3 +-- src/Handler.php | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Format/ArrayFormat.php b/src/Format/ArrayFormat.php index d645777..6dc4a70 100644 --- a/src/Format/ArrayFormat.php +++ b/src/Format/ArrayFormat.php @@ -18,8 +18,7 @@ class ArrayFormat implements IFormat { $result = json_encode($result); - return \response()->withContentType(ContentType::JSON) - ->withBody(new Stream(json_encode($result, JSON_UNESCAPED_UNICODE))); + return \response()->withBody(new Stream(json_encode($result, JSON_UNESCAPED_UNICODE))); } diff --git a/src/Handler.php b/src/Handler.php index 051116c..07c5138 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -4,7 +4,6 @@ declare(strict_types=1); namespace Kiri\Router; use Closure; -use Kiri\Router\Constrict\Stream; use Kiri\Router\Format\ArrayFormat; use Kiri\Router\Format\IFormat; use Kiri\Router\Format\MixedFormat; @@ -15,7 +14,6 @@ use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; use ReflectionException; use ReflectionNamedType; -use ReflectionType; class Handler implements RequestHandlerInterface {