src/OAuth2/Response.php
private function getHttpHeadersAsString($headers)
    {
        if (count($headers) == 0) {
            return '';
        }

        $max = max(array_map('strlen', array_keys($headers))) + 1;
        $content = '';
        ksort($headers);
        foreach ($headers as $name => $values) {
            foreach ($values as $value) {
                $content .= sprintf("%-{$max}s %s\r\n", $this->beautifyHeaderName($name).':', $value);
            }
        }

        return $content;
    }
private function getHttpHeadersAsString($headers)
    {
        if (count($headers) == 0) {
            return '';
        }

        $max = max(array_map('strlen', array_keys($headers))) + 1;
        $content = '';
        ksort($headers);
        foreach ($headers as $name => $values) {
            foreach ($values as $value) {
                $content .= sprintf("%-{$max}s %s\r\n", $this->beautifyHeaderName($name).':', $value);
            }
        }

        return $content;
    }
private function getHttpHeadersAsString ( $ headers ) { if ( count ( $ headers ) == 0 ) { return '' ; } $ max = max ( array_map ( 'strlen' , array_keys ( $ headers ) ) ) + 1 ; $ content = '' ; ksort ( $ headers ) ; foreach ( $ headers as $ name => $ values ) { foreach ( $ values as $ value ) { $ content .= sprintf ( "%-{$max}s %s\r\n" , $ this -> beautifyHeaderName ( $ name ) . ':' , $ value ) ; } } return $ content ; }
Function from Symfony2 HttpFoundation - output pretty header

@param array $headers
@return string
Function from Symfony2 HttpFoundation - output pretty header