<commit_before><?php

/*
 * This file is part of the Pushok package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Pushok;

/**
 * Class Request
 * @package Pushok
 *
 * @see http://bit.ly/communicating-with-apns
 */
class Request
{
    const APNS_DEVELOPMENT_SERVER = 'https://api.development.push.apple.com';
    const APNS_PRODUCTION_SERVER = 'https://api.push.apple.com';
    const APNS_PORT = 443;
    const APNS_PATH_SCHEMA = '/3/device/{token}';

    private $options = [];

    public function __construct(Message $message, $isProductionEnv)
    {
        if ($isProductionEnv) {
            $url = $this->getProductionUrl($message);
        } else {
            $url = $this->getSandboxUrl($message);
        }

        if (!defined(CURL_HTTP_VERSION_2)) {
            define(CURL_HTTP_VERSION_2, 3);
        }

        $this->options = [<commit_msg>Fix CURL_HTTP_VERSION_2 constant defining<commit_after><?php

/*
 * This file is part of the Pushok package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Pushok;

/**
 * Class Request
 * @package Pushok
 *
 * @see http://bit.ly/communicating-with-apns
 */
class Request
{
    const APNS_DEVELOPMENT_SERVER = 'https://api.development.push.apple.com';
    const APNS_PRODUCTION_SERVER = 'https://api.push.apple.com';
    const APNS_PORT = 443;
    const APNS_PATH_SCHEMA = '/3/device/{token}';

    private $options = [];

    public function __construct(Message $message, $isProductionEnv)
    {
        if ($isProductionEnv) {
            $url = $this->getProductionUrl($message);
        } else {
            $url = $this->getSandboxUrl($message);
        }

        if (!defined('CURL_HTTP_VERSION_2')) {
            define(CURL_HTTP_VERSION_2, 3);
        }

        $this->options = [
{'fraction_non_alphanumeric': 0.131, 'fraction_numerical': 0.0075, 'mean_word_length': 2.7754716981132077, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 4, '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': '3549401', 'n_tokens_mistral': 657, 'n_tokens_neox': 618, 'n_words': 147}