src/Client/OAuthClient.php
public function registerPreRequestMiddleware(IPreRequestMiddleware $middleware): IOAuthClient
    {
        $this->preRequestMiddlewares[get_class($middleware)] = $middleware;

        return $this;
    }
public function registerPreRequestMiddleware(IPreRequestMiddleware $middleware): IOAuthClient
    {
        $this->preRequestMiddlewares[get_class($middleware)] = $middleware;

        return $this;
    }
public function registerPreRequestMiddleware ( IPreRequestMiddleware $ middleware ) : IOAuthClient { $ this -> preRequestMiddlewares [ get_class ( $ middleware ) ] = $ middleware ; return $ this ; }
Register a pre request middleware

@param IPreRequestMiddleware $middleware

@return IOAuthClient
Register a pre request middleware