original_string: public function gatherRouteMiddleware(Route $route)
      {
          $middleware = collect($route->gatherMiddleware())->map(function ($name) {
              return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups);
          })->flatten();
  
          return $this->sortMiddleware($middleware);
      }
code: public function gatherRouteMiddleware(Route $route)
      {
          $middleware = collect($route->gatherMiddleware())->map(function ($name) {
              return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups);
          })->flatten();
  
          return $this->sortMiddleware($middleware);
      }
code_tokens: public function gatherRouteMiddleware ( Route $ route ) { $ middleware = collect ( $ route -> gatherMiddleware ( ) ) -> map ( function ( $ name ) { return ( array ) MiddlewareNameResolver :: resolve ( $ name , $ this -> middleware , $ this -> middlewareGroups ) ; } ) -> flatten ( ) ; return $ this -> sortMiddleware ( $ middleware ) ; }
docstring: Gather the middleware for the given route with resolved class names.
  
  @param  \Illuminate\Routing\Route  $route
  @return array
docstring_tokens: Gather the middleware for the given route with resolved class names .