<commit_before><?php

namespace Otg\Ean;

use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Command\Guzzle\Description;
use GuzzleHttp\Command\Guzzle\GuzzleClient;
use GuzzleHttp\Command\Guzzle\Serializer;
use Otg\Ean\RequestLocation\XmlQueryLocation;
use Otg\Ean\Subscriber\EanError;
use Otg\Ean\Subscriber\ContentLength;

/**
 * HotelClient object for executing commands against the EAN Hotel API
 *
 * @method array getHotelList(array $arguments)
 * @method array getRoomAvailability(array $arguments)
 * @method array postReservation(array $arguments)
 * @method array getRoomCancellation(array $arguments)
 * @package Otg\Ean
 */
class HotelClient extends GuzzleClient
{
    /**
     * Gets a new HotelClient
     *
     * @param  array       $config GuzzleClient $config options
     * @return HotelClient
     */
    public static function factory($config = array())
    {
        $description = new Description(include(__DIR__ . '/Resources/hotel-xml-v3.php'));

        $defaults = array(
            'serializer' => new Serializer($description, array(
                'xml.query' => new XmlQueryLocation('xml.query')
            )),
            'defaults' => array(
                'booking_endpoint' => 'https://book.api.ean.com',
                'general_endpoint' => 'http://api.ean.com',
                'cid' => '',
                'apiKey' => '',
                'customerIpAddress' => '',
                'customerUserAgent' => '',
            )
        );

        $config += $defaults;
        $config['defaults'] += $defaults['defaults'];

        $httpClient = new HttpClient();

        $client = new self($httpClient, $description, $config);
        $client->getEmitter()->attach(new EanError());
        $client->getEmitter()->attach(new ContentLength());

        return $client;<commit_msg>Add HttpClient config to HotelClient::factory<commit_after><?php

namespace Otg\Ean;

use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Command\Guzzle\Description;
use GuzzleHttp\Command\Guzzle\GuzzleClient;
use GuzzleHttp\Command\Guzzle\Serializer;
use Otg\Ean\RequestLocation\XmlQueryLocation;
use Otg\Ean\Subscriber\EanError;
use Otg\Ean\Subscriber\ContentLength;

/**
 * HotelClient object for executing commands against the EAN Hotel API
 *
 * @method array getHotelList(array $arguments)
 * @method array getRoomAvailability(array $arguments)
 * @method array postReservation(array $arguments)
 * @method array getRoomCancellation(array $arguments)
 * @package Otg\Ean
 */
class HotelClient extends GuzzleClient
{
    /**
     * Gets a new HotelClient
     *
     * @param  array       $config     GuzzleHttp\Command\Guzzle\GuzzleClient $config options
     * @param  array       $httpConfig GuzzleHttp\Client $config options
     * @return HotelClient
     */
    public static function factory($config = array(), $httpConfig = array())
    {
        $description = new Description(include(__DIR__ . '/Resources/hotel-xml-v3.php'));

        $defaults = array(
            'serializer' => new Serializer($description, array(
                'xml.query' => new XmlQueryLocation('xml.query')
            )),
            'defaults' => array(
                'booking_endpoint' => 'https://book.api.ean.com',
                'general_endpoint' => 'http://api.ean.com',
                'cid' => '',
                'apiKey' => '',
                'customerIpAddress' => '',
                'customerUserAgent' => '',
            )
        );

        $config += $defaults;
        $config['defaults'] += $defaults['defaults'];

        $httpClient = new HttpClient($httpConfig);

        $client = new self($httpClient, $description, $config);
        $client->getEmitter()->attach(new EanError());
        $client->getEmitter()->attach(new ContentLength());

        return $client;
{'fraction_non_alphanumeric': 0.1319316688567674, 'fraction_numerical': 0.0005256241787122207, 'mean_word_length': 2.7131707317073173, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '5481842', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1055, 'n_words': 229}