<commit_before><?php

namespace Keesschepers\DhlParcelApi;

use Keesschepers\DhlParcelApi\DhlApiException;
use GuzzleHttp\Client as GuzzleHttpClient;

class DhlClient
{
    private $userId;
    private $key;
    private $httpClient;
    private $apiTimeout;

    const ENDPOINT = 'https://api-gw.dhlparcel.nl';

    public function __construct(String $userId = null, String $key = null, Float $apiTimeout = 0.5)
    {
        $this->apiUserId = $userId;
        $this->apiKey = $key;
        $this->apiTimeout = $apiTimeout;
        $this->httpClient = new GuzzleHttpClient(['base_uri' => self::ENDPOINT]);
    }

    public function timeWindows($countryCode, $postalCode)
    {
        $response = $this->httpClient->get(
            '/time-windows',
            [
                'timeout' => ($this->apiTimeout / 1000),
            ],
            [
                'query' => ['countryCode' => $countryCode, 'postalCode' => $postalCode]
            ]
        );

        if (!$response->isSuccesfull()) {
            throw new DhlApiException('Could not retrieve time window information due to API server error.');
        }

        return json_decode($response->getBody()->getContents(), true);
    }
}<commit_msg>Query fix<commit_after><?php

namespace Keesschepers\DhlParcelApi;

use Keesschepers\DhlParcelApi\DhlApiException;
use GuzzleHttp\Client as GuzzleHttpClient;

class DhlClient
{
    private $userId;
    private $key;
    private $httpClient;
    private $apiTimeout;

    const ENDPOINT = 'https://api-gw.dhlparcel.nl';

    public function __construct(String $userId = null, String $key = null, Float $apiTimeout = 0.5)
    {
        $this->apiUserId = $userId;
        $this->apiKey = $key;
        $this->apiTimeout = $apiTimeout;
        $this->httpClient = new GuzzleHttpClient(['base_uri' => self::ENDPOINT]);
    }

    public function timeWindows($countryCode, $postalCode)
    {
        $response = $this->httpClient->get(
            '/time-windows',
            [
                'timeout' => ($this->apiTimeout / 1000),
                'query' => ['countryCode' => $countryCode, 'postalCode' => $postalCode],
            ]
        );

        if (200 !== $response->getStatusCode()) {
            throw new DhlApiException('Could not retrieve time window information due to API server error.');
        }

        return json_decode($response->getBody()->getContents(), true);
    }
}
{'fraction_non_alphanumeric': 0.13421706710853357, 'fraction_numerical': 0.006213753106876553, 'mean_word_length': 2.510174418604651, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, 'https://': 2, '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': '3982780', 'n_tokens_mistral': 736, 'n_tokens_neox': 718, 'n_words': 154}