public function get(string $method = null) : array
    {
        if ($method === null) {
            return $this->routes;
        } elseif (isset($this->routes[$method])) {
            return $this->routes[$method];
        } else {
            return [];
        }
    }
public function get(string $method = null) : array
    {
        if ($method === null) {
            return $this->routes;
        } elseif (isset($this->routes[$method])) {
            return $this->routes[$method];
        } else {
            return [];
        }
    }
public function get ( string $ method = null ) : array { if ( $ method === null ) { return $ this -> routes ; } elseif ( isset ( $ this -> routes [ $ method ] ) ) { return $ this -> routes [ $ method ] ; } else { return [ ] ; } }
Gets all the routes

@param string|null $method If specified, the list of routes for that method will be returned
If null, all routes will be returned, keyed by method
@return ParsedRoute[] The list of routes
Gets all the routes