public function getRoutes(): array
    {
        $routes = [];
        $this->each(function (Route $route) use (&$routes) {
            $routes[] = $route;
        });

        return $routes;
    }
public function getRoutes(): array
    {
        $routes = [];
        $this->each(function (Route $route) use (&$routes) {
            $routes[] = $route;
        });

        return $routes;
    }
public function getRoutes ( ) : array { $ routes = [ ] ; $ this -> each ( function ( Route $ route ) use ( & $ routes ) { $ routes [ ] = $ route ; } ) ; return $ routes ; }
get all routes
@return array
get all routes