src/Viserio/Component/Routing/Command/RouteListCommand.php
protected function filterRoute(array $route): ?array
    {
        $isNotName   = ($this->option('name') && \strpos($route['name'], $this->option('name')) === false);
        $isNotPath   = ($this->option('path') && \strpos($route['uri'], $this->option('path')) === false);
        $isNotMethod = ($this->option('method') && \in_array(\strtoupper($this->option('method')), $route['method'], true) === false);

        if ($isNotName || $isNotPath || $isNotMethod) {
            return null;
        }

        $route['method'] = \implode('|', $route['method']);

        return $route;
    }
protected function filterRoute(array $route): ?array
    {
        $isNotName   = ($this->option('name') && \strpos($route['name'], $this->option('name')) === false);
        $isNotPath   = ($this->option('path') && \strpos($route['uri'], $this->option('path')) === false);
        $isNotMethod = ($this->option('method') && \in_array(\strtoupper($this->option('method')), $route['method'], true) === false);

        if ($isNotName || $isNotPath || $isNotMethod) {
            return null;
        }

        $route['method'] = \implode('|', $route['method']);

        return $route;
    }
Filter the route by URI and / or name.

@param array $route

@return null|array