From 742867e2f9f02896f6e1b92f27d8f44c09df95e8 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Tue, 31 Aug 2021 01:48:34 +0800 Subject: [PATCH] 111 --- http-helper/Route/Router.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/http-helper/Route/Router.php b/http-helper/Route/Router.php index 80511841..d5134ba9 100644 --- a/http-helper/Route/Router.php +++ b/http-helper/Route/Router.php @@ -428,17 +428,12 @@ class Router extends HttpService implements RouterInterface public function each(): array { $paths = []; - foreach ($this->nodes as $node) { + foreach ($this->nodes as $_node) { /** @var Node[] $node */ - - var_dump($node); - foreach ($node as $_node) { - if (!empty($_node->sourcePath)) { - $path[] = ['method' => $_node->method, 'path' => $_node->sourcePath]; - } - var_dump($_node); - $paths = $this->getChildes($_node, $paths); - } + if (!empty($_node->sourcePath)) { + $path[] = ['method' => $_node->method, 'path' => $_node->sourcePath]; + } + $paths = $this->getChildes($_node, $paths); } return $paths; }