<commit_before><?php

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

namespace SensioLabs\Connect\Security\Authentication\Token;

use Symfony\Component\Security\Core\Authentication\Token\AbstractToken;

if (\PHP_VERSION_ID >= 70100 && method_exists(AbstractToken::class, '__serialize')) {
eval(<<<'EOPHP'
    namespace SensioLabs\Connect\Security\Authentication\Token;

    /**
     * @internal
     */
    trait SerializationConnectTokenTrait
    {
        public function __serialize(): array
        {
            return [$this->apiUser, $this->accessToken, $this->providerKey, $this->scope, parent::__serialize()];
        }

        public function __unserialize(array $data): void
        {
            list($this->apiUser, $this->accessToken, $this->providerKey, $this->scope) = $data;
            parent::__serialize($data);
        }
    }<commit_msg>Fix unserializing ConnectToken<commit_after><?php

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

namespace SensioLabs\Connect\Security\Authentication\Token;

use Symfony\Component\Security\Core\Authentication\Token\AbstractToken;

if (\PHP_VERSION_ID >= 70100 && method_exists(AbstractToken::class, '__serialize')) {
eval(<<<'EOPHP'
    namespace SensioLabs\Connect\Security\Authentication\Token;

    /**
     * @internal
     */
    trait SerializationConnectTokenTrait
    {
        public function __serialize(): array
        {
            return [$this->apiUser, $this->accessToken, $this->providerKey, $this->scope, parent::__serialize()];
        }

        public function __unserialize(array $data): void
        {
            list($this->apiUser, $this->accessToken, $this->providerKey, $this->scope, $parentState) = $data;

            parent::__unserialize($parentState);
        }
    }
{'fraction_non_alphanumeric': 0.12470477090222012, 'fraction_numerical': 0.004723665564478035, 'mean_word_length': 3.2961460446247464, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, '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': '987148', 'n_tokens_mistral': 611, 'n_tokens_neox': 600, 'n_words': 139}