original_string: public static function forFunction($function, array $functionParameters = []) : RouteMatch
      {
          try {
              $controller = new \ReflectionFunction($function);
          } catch (\ReflectionException $e) {
              throw RoutingException::invalidControllerFunction($e, $function);
          }
  
          return new self($controller, [], $functionParameters);
      }
code: public static function forFunction($function, array $functionParameters = []) : RouteMatch
      {
          try {
              $controller = new \ReflectionFunction($function);
          } catch (\ReflectionException $e) {
              throw RoutingException::invalidControllerFunction($e, $function);
          }
  
          return new self($controller, [], $functionParameters);
      }
code_tokens: public static function forFunction ( $ function , array $ functionParameters = [ ] ) : RouteMatch { try { $ controller = new \ ReflectionFunction ( $ function ) ; } catch ( \ ReflectionException $ e ) { throw RoutingException :: invalidControllerFunction ( $ e , $ function ) ; } return new self ( $ controller , [ ] , $ functionParameters ) ; }
docstring: Returns a RouteMatch for the given function or closure.
  
  @param string|\Closure $function
  @param array           $functionParameters
  
  @return RouteMatch The route match.
  
  @throws RoutingException If the function is invalid.
docstring_tokens: Returns a RouteMatch for the given function or closure .