<commit_before><?php
/**
 * @see       https://github.com/zendframework/zend-http for the canonical source repository
 * @copyright Copyright (c) 2005-2017 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   https://github.com/zendframework/zend-http/blob/master/LICENSE.md New BSD License
 */

namespace Zend\Http\Header;

use DateTime;
use Zend\Uri\UriFactory;

/**
 * @throws Exception\InvalidArgumentException
 * @see http://www.ietf.org/rfc/rfc2109.txt
 * @see http://www.w3.org/Protocols/rfc2109/rfc2109
 */
class SetCookie implements MultipleHeaderInterface
{
    /**
     * Cookie will not be sent for any cross-domain requests whatsoever.
     * Even if the user simply navigates to the target site with a regular link, the cookie will not be sent.
     */
    const SAME_SITE_STRICT = 'Strict';

    /**
     * Cookie will not be passed for any cross-domain requests unless it's a regular link that navigates user
     * to the target site.
     * Other requests methods (such as POST and PUT) and XHR requests will not contain this cookie.
     */
    const SAME_SITE_LAX = 'Lax';

    /**
     * Vookie will be sent with same-site and cross-site requests.
     */
    const SAME_SITE_NONE = 'None';

    const SAME_SITE_ALLOWED_VALUES = [
        self::SAME_SITE_STRICT,
        self::SAME_SITE_LAX
    ];

    /**
     * Cookie name
     *
     * @var string|null
     */
    protected $name;

    /**
     * Cookie value
     *
     * @var string|null
     */
    protected $value;

    /**
     * Version
     *<commit_msg>Add None value in allowed values #174<commit_after><?php
/**
 * @see       https://github.com/zendframework/zend-http for the canonical source repository
 * @copyright Copyright (c) 2005-2017 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   https://github.com/zendframework/zend-http/blob/master/LICENSE.md New BSD License
 */

namespace Zend\Http\Header;

use DateTime;
use Zend\Uri\UriFactory;

/**
 * @throws Exception\InvalidArgumentException
 * @see http://www.ietf.org/rfc/rfc2109.txt
 * @see http://www.w3.org/Protocols/rfc2109/rfc2109
 */
class SetCookie implements MultipleHeaderInterface
{
    /**
     * Cookie will not be sent for any cross-domain requests whatsoever.
     * Even if the user simply navigates to the target site with a regular link, the cookie will not be sent.
     */
    const SAME_SITE_STRICT = 'Strict';

    /**
     * Cookie will not be passed for any cross-domain requests unless it's a regular link that navigates user
     * to the target site.
     * Other requests methods (such as POST and PUT) and XHR requests will not contain this cookie.
     */
    const SAME_SITE_LAX = 'Lax';

    /**
     * Vookie will be sent with same-site and cross-site requests.
     */
    const SAME_SITE_NONE = 'None';

    const SAME_SITE_ALLOWED_VALUES = [
        self::SAME_SITE_STRICT,
        self::SAME_SITE_LAX,
        self::SAME_SITE_NONE,
    ];

    /**
     * Cookie name
     *
     * @var string|null
     */
    protected $name;

    /**
     * Cookie value
     *
     * @var string|null
     */
    protected $value;

    /**
     * Version
     *
{'fraction_non_alphanumeric': 0.10624801776086266, 'fraction_numerical': 0.014272121788772598, 'mean_word_length': 2.567873303167421, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 6, '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': '5798013', 'n_tokens_mistral': 1043, 'n_tokens_neox': 968, 'n_words': 287}