<commit_before><?php

namespace React\Http;

use React\EventLoop\LoopInterface;
use React\Http\Client\ConnectionManager;
use Guzzle\Http\Message\Request as GuzzleRequest;
use React\Http\Client\Request;

class Client
{
    private $loop;

    private $connectionManager;

    public function __construct(LoopInterface $loop)
    {
        $this->loop = $loop;
    }

    public function request($method, $url, array $headers = array())
    {
        $guzzleRequest = new GuzzleRequest($method, $url, $headers);
        $connectionManager = $this->getConnectionManager();
        return new Request($this->loop, $connectionManager, $guzzleRequest);
    }

    public function setConnectionManager(ConnectionManagerInterface $connectionManager)
    {
        $this->connectionManager = $connectionManager;
    }

    public function getConnectionManager()
    {
        if (null === $connectionManager = $this->connectionManager) {
            return $this->connectionManager = new ConnectionManager($this->loop);
        }
        return $connectionManager;
    }
}

<commit_msg>[http client] fixed name clash<commit_after><?php

namespace React\Http;

use React\EventLoop\LoopInterface;
use React\Http\Client\ConnectionManager;
use Guzzle\Http\Message\Request as GuzzleRequest;
use React\Http\Client\Request as ClientRequest;

class Client
{
    private $loop;

    private $connectionManager;

    public function __construct(LoopInterface $loop)
    {
        $this->loop = $loop;
    }

    public function request($method, $url, array $headers = array())
    {
        $guzzleRequest = new GuzzleRequest($method, $url, $headers);
        $connectionManager = $this->getConnectionManager();
        return new ClientRequest($this->loop, $connectionManager, $guzzleRequest);
    }

    public function setConnectionManager(ConnectionManagerInterface $connectionManager)
    {
        $this->connectionManager = $connectionManager;
    }

    public function getConnectionManager()
    {
        if (null === $connectionManager = $this->connectionManager) {
            return $this->connectionManager = new ConnectionManager($this->loop);
        }
        return $connectionManager;
    }
}


{'fraction_non_alphanumeric': 0.10847766636280766, 'fraction_numerical': 0.0, 'mean_word_length': 3.4523326572008113, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '7288289', 'n_tokens_mistral': 592, 'n_tokens_neox': 570, 'n_words': 132}