111
This commit is contained in:
@@ -430,9 +430,7 @@ class Router extends HttpService implements RouterInterface
|
||||
$paths = [];
|
||||
foreach ($this->nodes as $_node) {
|
||||
/** @var Node[] $node */
|
||||
if (!empty($_node->sourcePath)) {
|
||||
$path[] = ['method' => $_node->method, 'path' => $_node->sourcePath];
|
||||
}
|
||||
$paths[] = ['method' => $_node->method, 'path' => $_node->sourcePath];
|
||||
$paths = $this->getChildes($_node, $paths);
|
||||
}
|
||||
return $paths;
|
||||
@@ -447,9 +445,7 @@ class Router extends HttpService implements RouterInterface
|
||||
private function getChildes(Node $node, array $path): array
|
||||
{
|
||||
foreach ($node->childes as $item) {
|
||||
if (!empty($item->sourcePath)) {
|
||||
$path[] = ['method' => $item->method, 'path' => $item->sourcePath];
|
||||
}
|
||||
$path[] = ['method' => $item->method, 'path' => $item->sourcePath];
|
||||
if (!empty($item->childes)) {
|
||||
$path = $this->getChildes($item, $path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user