From 9832d3bf225e6155b45ada475a4b7a6b87feabf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 15 Oct 2020 15:14:25 +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/Route/Middleware.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/HttpServer/Route/Middleware.php b/HttpServer/Route/Middleware.php index 39db32ab..22ce4ae7 100644 --- a/HttpServer/Route/Middleware.php +++ b/HttpServer/Route/Middleware.php @@ -6,13 +6,12 @@ * Time: 02:17 */ +// declare(strict_types=1); + namespace HttpServer\Route; -use Closure; use Exception; use HttpServer\Route\Dispatch\Dispatch; -use Snowflake\Snowflake; -use Swoole\Coroutine; /** * Class Middleware @@ -49,7 +48,7 @@ class Middleware * @return mixed * @throws Exception */ - public function getGenerate($node) + public function getGenerate(Node $node) { $last = function ($passable) use ($node) { return Dispatch::create($node->handler, $passable)->dispatch(); @@ -62,7 +61,7 @@ class Middleware * @param Node $node * @return array */ - protected function annotation($node) + protected function annotation(Node $node) { $middleWares = $this->middleWares; $this->middleWares = []; @@ -81,7 +80,7 @@ class Middleware * @param $middleWares * @return array */ - protected function annotation_limit($node, $middleWares) + protected function annotation_limit(Node $node, $middleWares) { if (!$node->hasLimits()) { return $middleWares;