protected function getApiKeyMiddleware()
    {
        $handleRequest = function (RequestInterface $request) {
            return $request->withUri(Uri::withQueryValue(
                $request->getUri(),
                static::PARAM_API_KEY,
                $this->apiKey
            ));
        };

        return Middleware::mapRequest($handleRequest);
    }
protected function getApiKeyMiddleware()
    {
        $handleRequest = function (RequestInterface $request) {
            return $request->withUri(Uri::withQueryValue(
                $request->getUri(),
                static::PARAM_API_KEY,
                $this->apiKey
            ));
        };

        return Middleware::mapRequest($handleRequest);
    }
protected function getApiKeyMiddleware ( ) { $ handleRequest = function ( RequestInterface $ request ) { return $ request -> withUri ( Uri :: withQueryValue ( $ request -> getUri ( ) , static :: PARAM_API_KEY , $ this -> apiKey ) ) ; } ; return Middleware :: mapRequest ( $ handleRequest ) ; }
Return the Guzzle Middleware responsible for ensuring the API key is
always present in a request.

@return callable
Return the Guzzle Middleware responsible for ensuring the API key is always present in a request .