<commit_before><?php

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

namespace App\Tests\Behat\Context\Setup;

use App\Entity\User;
use App\Fixture\Factory\AppUserExampleFactory;
use Behat\Behat\Context\Context;
use Monofony\Bridge\Behat\Service\AppSecurityService;
use Monofony\Bridge\Behat\Service\SecurityServiceInterface;
use Monofony\Bridge\Behat\Service\SharedStorageInterface;
use Sylius\Component\User\Model\UserInterface;
use Sylius\Component\User\Repository\UserRepositoryInterface;
use Webmozart\Assert\Assert;

final class SecurityContext implements Context
{
    private $sharedStorage;
    private $securityService;
    private $appUserFactory;
    private $appUserRepository;

    public function __construct(
        SharedStorageInterface $sharedStorage,
        AppSecurityService $securityService,
        AppUserExampleFactory $appUserFactory,
        UserRepositoryInterface $appUserRepository
    ) {
        $this->sharedStorage = $sharedStorage;
        $this->securityService = $securityService;
        $this->appUserFactory = $appUserFactory;
        $this->appUserRepository = $appUserRepository;
    }

    /**
     * @Given I am logged in as :email
     */<commit_msg>Fix security context<commit_after><?php

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

namespace App\Tests\Behat\Context\Setup;

use App\Entity\User;
use App\Fixture\Factory\AppUserExampleFactory;
use App\Tests\Behat\Service\SecurityService;
use Behat\Behat\Context\Context;
use Monofony\Bridge\Behat\Service\SharedStorageInterface;
use Sylius\Component\User\Model\UserInterface;
use Sylius\Component\User\Repository\UserRepositoryInterface;
use Webmozart\Assert\Assert;

final class SecurityContext implements Context
{
    private $sharedStorage;
    private $securityService;
    private $appUserFactory;
    private $appUserRepository;

    public function __construct(
        SharedStorageInterface $sharedStorage,
        SecurityService $securityService,
        AppUserExampleFactory $appUserFactory,
        UserRepositoryInterface $appUserRepository
    ) {
        $this->sharedStorage = $sharedStorage;
        $this->securityService = $securityService;
        $this->appUserFactory = $appUserFactory;
        $this->appUserRepository = $appUserRepository;
    }

    /**
     * @Given I am logged in as :email
     */
{'fraction_non_alphanumeric': 0.08826901031715705, 'fraction_numerical': 0.0, 'mean_word_length': 3.9118198874296435, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '666175', 'n_tokens_mistral': 726, 'n_tokens_neox': 717, 'n_words': 174}