private function normalizeHeaders($headers)
    {
        if (is_array($headers)) {
            $headers = new Headers($headers);
        } elseif (!($headers instanceof Headers)) {
            throw new InvalidArgumentException(
                'Headers must be an array or instance of Headers'
            );
        }

        return $headers;
    }
private function normalizeHeaders($headers)
    {
        if (is_array($headers)) {
            $headers = new Headers($headers);
        } elseif (!($headers instanceof Headers)) {
            throw new InvalidArgumentException(
                'Headers must be an array or instance of Headers'
            );
        }

        return $headers;
    }
private function normalizeHeaders ( $ headers ) { if ( is_array ( $ headers ) ) { $ headers = new Headers ( $ headers ) ; } elseif ( ! ( $ headers instanceof Headers ) ) { throw new InvalidArgumentException ( 'Headers must be an array or instance of Headers' ) ; } return $ headers ; }
Normalize provided headers and ensure that the result object is Headers.

@param Headers|array $headers The request body object

@return Headers Normalized headers

@throws \InvalidArgumentException If an unsupported argument type is provided.
Normalize provided headers and ensure that the result object is Headers .