original_string: private function route(Request $request) : RouteMatch
      {
          foreach ($this->routes as $route) {
              try {
                  $match = $route->match($request);
              }
              catch (RoutingException $e) {
                  throw new HttpNotFoundException($e->getMessage(), $e);
              }
  
              if ($match !== null) {
                  if ($match instanceof RouteMatch) {
                      return $match;
                  }
  
                  throw $this->invalidReturnValue('route', Route::class . ' or NULL', $match);
              }
          }
  
          throw new HttpNotFoundException('No route matches the request.');
      }
code: private function route(Request $request) : RouteMatch
      {
          foreach ($this->routes as $route) {
              try {
                  $match = $route->match($request);
              }
              catch (RoutingException $e) {
                  throw new HttpNotFoundException($e->getMessage(), $e);
              }
  
              if ($match !== null) {
                  if ($match instanceof RouteMatch) {
                      return $match;
                  }
  
                  throw $this->invalidReturnValue('route', Route::class . ' or NULL', $match);
              }
          }
  
          throw new HttpNotFoundException('No route matches the request.');
      }
code_tokens: private function route ( Request $ request ) : RouteMatch { foreach ( $ this -> routes as $ route ) { try { $ match = $ route -> match ( $ request ) ; } catch ( RoutingException $ e ) { throw new HttpNotFoundException ( $ e -> getMessage ( ) , $ e ) ; } if ( $ match !== null ) { if ( $ match instanceof RouteMatch ) { return $ match ; } throw $ this -> invalidReturnValue ( 'route' , Route :: class . ' or NULL' , $ match ) ; } } throw new HttpNotFoundException ( 'No route matches the request.' ) ; }
docstring: Routes the given Request.
  
  @param Request $request The request.
  
  @return RouteMatch The route match.
  
  @throws HttpNotFoundException     If no route matches the request.
  @throws \UnexpectedValueException If a route returns an invalid value.
docstring_tokens: Routes the given Request .