original_string: public function nextMiddleware(Request $req, Response $res)
      {
          $middleware = $this->middleware->current();
  
          // base case - no middleware left
          if (!$middleware) {
              return $res;
          }
  
          // otherwise, call next middleware
          $this->middleware->next();
  
          return $middleware($req, $res, [$this, 'nextMiddleware']);
      }
code: public function nextMiddleware(Request $req, Response $res)
      {
          $middleware = $this->middleware->current();
  
          // base case - no middleware left
          if (!$middleware) {
              return $res;
          }
  
          // otherwise, call next middleware
          $this->middleware->next();
  
          return $middleware($req, $res, [$this, 'nextMiddleware']);
      }
code_tokens: public function nextMiddleware ( Request $ req , Response $ res ) { $ middleware = $ this -> middleware -> current ( ) ; // base case - no middleware left if ( ! $ middleware ) { return $ res ; } // otherwise, call next middleware $ this -> middleware -> next ( ) ; return $ middleware ( $ req , $ res , [ $ this , 'nextMiddleware' ] ) ; }
docstring: Calls the next middleware in the chain.
  DO NOT call directly.
  
  @param Request  $req
  @param Response $res
  
  @return Response
docstring_tokens: Calls the next middleware in the chain . DO NOT call directly .