private function mergeDefaults(&$options)
    {
        // Merging optimization for when no headers are present
        if (!isset($options['headers'])
            || !isset($this->defaults['headers'])) {
            $options = array_replace_recursive($this->defaults, $options);
            return null;
        }

        $defaults = $this->defaults;
        unset($defaults['headers']);
        $options = array_replace_recursive($defaults, $options);

        return $this->defaults['headers'];
    }
private function mergeDefaults(&$options)
    {
        // Merging optimization for when no headers are present
        if (!isset($options['headers'])
            || !isset($this->defaults['headers'])) {
            $options = array_replace_recursive($this->defaults, $options);
            return null;
        }

        $defaults = $this->defaults;
        unset($defaults['headers']);
        $options = array_replace_recursive($defaults, $options);

        return $this->defaults['headers'];
    }
private function mergeDefaults ( & $ options ) { // Merging optimization for when no headers are present if ( ! isset ( $ options [ 'headers' ] ) || ! isset ( $ this -> defaults [ 'headers' ] ) ) { $ options = array_replace_recursive ( $ this -> defaults , $ options ) ; return null ; } $ defaults = $ this -> defaults ; unset ( $ defaults [ 'headers' ] ) ; $ options = array_replace_recursive ( $ defaults , $ options ) ; return $ this -> defaults [ 'headers' ] ; }
Merges default options into the array passed by reference and returns
an array of headers that need to be merged in after the request is
created.

@param array $options Options to modify by reference

@return array|null
Merges default options into the array passed by reference and returns an array of headers that need to be merged in after the request is created .