original_string: public function remove($remove)
      {
          $this->cached = null;
          $idx = is_callable($remove) ? 0 : 1;
          $this->stack = array_values(array_filter(
              $this->stack,
              function ($tuple) use ($idx, $remove) {
                  return $tuple[$idx] !== $remove;
              }
          ));
      }
code: public function remove($remove)
      {
          $this->cached = null;
          $idx = is_callable($remove) ? 0 : 1;
          $this->stack = array_values(array_filter(
              $this->stack,
              function ($tuple) use ($idx, $remove) {
                  return $tuple[$idx] !== $remove;
              }
          ));
      }
code_tokens: public function remove ( $ remove ) { $ this -> cached = null ; $ idx = is_callable ( $ remove ) ? 0 : 1 ; $ this -> stack = array_values ( array_filter ( $ this -> stack , function ( $ tuple ) use ( $ idx , $ remove ) { return $ tuple [ $ idx ] !== $ remove ; } ) ) ; }
docstring: Remove a middleware by instance or name from the stack.
  
  @param callable|string $remove Middleware to remove by instance or name.
docstring_tokens: Remove a middleware by instance or name from the stack .