From e8c2bec566a8fa9d828029d9734b095b5190e9cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 12 Jul 2021 17:39:09 +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/Node.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index f7d5ce0a..c21e47b3 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -158,17 +158,16 @@ class Node extends HttpService { $middleWares = $this->getMiddleWares(); $middleWares = $this->annotation_limit($this, $middleWares); - $middleWares = $this->annotation_interceptor($this, $middleWares); - return $middleWares; + return $this->annotation_interceptor($this, $middleWares); } /** * @param Node $node - * @param $middleWares + * @param array $middleWares * @return array */ - protected function annotation_interceptor(Node $node, $middleWares = []): array + #[Pure] protected function annotation_interceptor(Node $node, array $middleWares = []): array { if (!$node->hasInterceptor()) { return $middleWares; @@ -182,10 +181,10 @@ class Node extends HttpService /** * @param Node $node - * @param $middleWares + * @param array $middleWares * @return array */ - protected function annotation_limit(Node $node, $middleWares = []): array + #[Pure] protected function annotation_limit(Node $node, array $middleWares = []): array { if (!$node->hasLimits()) { return $middleWares; @@ -268,7 +267,7 @@ class Node extends HttpService } /** - * @param $request + * @param Request $request * @return bool */ public function methodAllow(Request $request): bool