private function encodeOAuthHeaders(&$oauth)
    {
        $values = [];
        foreach ($oauth as $key => &$value) {
            $values[] = $key.'="'.\rawurlencode($value).'"';
        }

        return 'OAuth '.\implode(', ', $values);
    }