protected function addContentTypeToHeader($headers, $contentType)
    {
        $keys = array_change_key_case(array_keys($headers), CASE_LOWER);

        if (!isset($keys['content-type'])) {
            $headers['content-type'] = [$contentType];
        }

        return $headers;
    }
protected function addContentTypeToHeader($headers, $contentType)
    {
        $keys = array_change_key_case(array_keys($headers), CASE_LOWER);

        if (!isset($keys['content-type'])) {
            $headers['content-type'] = [$contentType];
        }

        return $headers;
    }
protected function addContentTypeToHeader ( $ headers , $ contentType ) { $ keys = array_change_key_case ( array_keys ( $ headers ) , CASE_LOWER ) ; if ( ! isset ( $ keys [ 'content-type' ] ) ) { $ headers [ 'content-type' ] = [ $ contentType ] ; } return $ headers ; }
Add content-type to headers variable if not exists.

@param   array  $headers     The headers variable.
@param   string $contentType The content-type.

@return array
Add content - type to headers variable if not exists .