<commit_before><?php
namespace Bruno\AdobeConnectClient\Connection;

/**
 * The server response
 */
class CurlResponse implements ResponseInterface
{
    /**
     * @var int
     */
    protected $statusCode = 0;

    /**
     * @var array An array as name => value. Value is an array
     */
    protected $headers = [];

    /**
     * @var \Bruno\AdobeConnectClient\Connection\StreamInterface The response body
     */
    protected $body = null;

    /**
     * Create the Response
     *
     * @param int $statusCode The response status code
     * @param array $headers An array as name => value. Value is an array of strings.
     * @param \Bruno\AdobeConnectClient\Connection\StreamInterface $body The response body
     */
    public function __construct($statusCode, array $headers, StreamInterface $body)
    {
        $this->statusCode = intval($statusCode);
        $this->headers = $headers;
        $this->body = $body;
    }

    public function getStatusCode()
    {
        return $this->statusCode;
    }

    /**
     * Get the Body
     *
     * @return \Bruno\AdobeConnectClient\Connection\StreamInterface
     */
    public function getBody()
    {
        return $this->body;
    }

    /**
     * Get all Headers
     *
     * @return array
     */
    public function getHeaders()
    {
        return $this->headers;
    }

    /**
     * Get a specific header
     *
     * @param string $name The header name
     * @return array
     */
    public function getHeader($name)
    {
        if (isset($this->headers[$name])) {
            return $this->headers[$name];
        }
        $name = $this->normalizeString($name);

        foreach ($this->headers as $header => $value) {
            if ($this->normalizeString($header) === $name) {
                return $value;
            }
        }
        return [];
    }

    /**
     * Get a specific header concat the values with comma
     *
     * @param string The header name
     * @return string
     */
    public function getHeaderLine($name)
    {
        return implode(',', $this->getHeader($name));
    }

    /**
     * Get the reason phrase
     *
     * @return string
     */
    public function getReasonPhrase()
    {
        switch ($this->statusCode) {
            case 100: $text = 'Continue'; break;<commit_msg>Add space after comma in getHeaderLine()<commit_after><?php
namespace Bruno\AdobeConnectClient\Connection;

/**
 * The server response
 */
class CurlResponse implements ResponseInterface
{
    /**
     * @var int
     */
    protected $statusCode = 0;

    /**
     * @var array An array as name => value. Value is an array
     */
    protected $headers = [];

    /**
     * @var \Bruno\AdobeConnectClient\Connection\StreamInterface The response body
     */
    protected $body = null;

    /**
     * Create the Response
     *
     * @param int $statusCode The response status code
     * @param array $headers An array as name => value. Value is an array of strings.
     * @param \Bruno\AdobeConnectClient\Connection\StreamInterface $body The response body
     */
    public function __construct($statusCode, array $headers, StreamInterface $body)
    {
        $this->statusCode = intval($statusCode);
        $this->headers = $headers;
        $this->body = $body;
    }

    public function getStatusCode()
    {
        return $this->statusCode;
    }

    /**
     * Get the Body
     *
     * @return \Bruno\AdobeConnectClient\Connection\StreamInterface
     */
    public function getBody()
    {
        return $this->body;
    }

    /**
     * Get all Headers
     *
     * @return array
     */
    public function getHeaders()
    {
        return $this->headers;
    }

    /**
     * Get a specific header
     *
     * @param string $name The header name
     * @return array
     */
    public function getHeader($name)
    {
        if (isset($this->headers[$name])) {
            return $this->headers[$name];
        }
        $name = $this->normalizeString($name);

        foreach ($this->headers as $header => $value) {
            if ($this->normalizeString($header) === $name) {
                return $value;
            }
        }
        return [];
    }

    /**
     * Get a specific header concat the values with comma
     *
     * @param string The header name
     * @return string
     */
    public function getHeaderLine($name)
    {
        return implode(', ', $this->getHeader($name));
    }

    /**
     * Get the reason phrase
     *
     * @return string
     */
    public function getReasonPhrase()
    {
        switch ($this->statusCode) {
            case 100: $text = 'Continue'; break;
{'fraction_non_alphanumeric': 0.12145922746781115, 'fraction_numerical': 0.0017167381974248926, 'mean_word_length': 1.933291378225299, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '904509', 'n_tokens_mistral': 1330, 'n_tokens_neox': 1295, 'n_words': 352}