From 3d4c4bcd5431a8b3fb30ae7a34a835ca3504ca87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 30 Aug 2021 17:11:37 +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 --- http-helper/Route/Router.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/http-helper/Route/Router.php b/http-helper/Route/Router.php index 3342ea4e..b0983e32 100644 --- a/http-helper/Route/Router.php +++ b/http-helper/Route/Router.php @@ -390,7 +390,6 @@ class Router extends HttpService implements RouterInterface /** * @param array|null $explode - * @param $method * @return Node|null * 查找指定路由 * @throws Exception @@ -537,18 +536,19 @@ class Router extends HttpService implements RouterInterface * @param RequestInterface $request * @return Node|null * 树杈搜索 + * @throws Exception */ public function Branch_search(RequestInterface $request): ?Node { $uri = $request->getUri(); - $node = $this->tree_search($uri->getExplode(), $request->getMethod()); + $node = $this->tree_search($uri->getExplode()); if ($node instanceof Node) { return $node; } if (!$request->isMethod('OPTIONS')) { return null; } - $node = $this->tree_search(['*'], $request->getMethod()); + $node = $this->tree_search(['*']); if (!($node instanceof Node)) { return null; }