src/Router.php
public function route(string $path): Route
    {
        $routes = $this->routes();

        if (empty($routes[$path])) {
            throw new Exceptions\NotFound\Path('Route `' . $path . '` not found');
        }

        return $routes[$path];
    }
public function route(string $path): Route
    {
        $routes = $this->routes();

        if (empty($routes[$path])) {
            throw new Exceptions\NotFound\Path('Route `' . $path . '` not found');
        }

        return $routes[$path];
    }
public function route ( string $ path ) : Route { $ routes = $ this -> routes ( ) ; if ( empty ( $ routes [ $ path ] ) ) { throw new Exceptions \ NotFound \ Path ( 'Route `' . $ path . '` not found' ) ; } return $ routes [ $ path ] ; }
@param string $path

@return Route

@throws Exceptions\NotFound\Path
@param string $path