private function appendUserAgent(array $options): array
    {
        $defaultAgent = 'GuzzleHttp/' . Client::VERSION;
        if (extension_loaded('curl') && function_exists('curl_version')) {
            $defaultAgent .= ' curl/' . \curl_version()['version'];
        }
        $defaultAgent .= ' PHP/' . PHP_VERSION;

        if (!isset($options['headers']['User-Agent'])) {
            $options['headers']['User-Agent'] = $defaultAgent;
        }

        $options['headers']['User-Agent'] .= ' ' . $defaultAgent;

        return $options;
    }
private function appendUserAgent(array $options): array
    {
        $defaultAgent = 'GuzzleHttp/' . Client::VERSION;
        if (extension_loaded('curl') && function_exists('curl_version')) {
            $defaultAgent .= ' curl/' . \curl_version()['version'];
        }
        $defaultAgent .= ' PHP/' . PHP_VERSION;

        if (!isset($options['headers']['User-Agent'])) {
            $options['headers']['User-Agent'] = $defaultAgent;
        }

        $options['headers']['User-Agent'] .= ' ' . $defaultAgent;

        return $options;
    }
private function appendUserAgent ( array $ options ) : array { $ defaultAgent = 'GuzzleHttp/' . Client :: VERSION ; if ( extension_loaded ( 'curl' ) && function_exists ( 'curl_version' ) ) { $ defaultAgent .= ' curl/' . \ curl_version ( ) [ 'version' ] ; } $ defaultAgent .= ' PHP/' . PHP_VERSION ; if ( ! isset ( $ options [ 'headers' ] [ 'User-Agent' ] ) ) { $ options [ 'headers' ] [ 'User-Agent' ] = $ defaultAgent ; } $ options [ 'headers' ] [ 'User-Agent' ] .= ' ' . $ defaultAgent ; return $ options ; }
Append User-Agent header to Request options.

@param array $options
@return array
Append User - Agent header to Request options .