<commit_before><?php

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

namespace Packagist\WebBundle\Util;

use FOS\UserBundle\Model\UserManagerInterface;
use FOS\UserBundle\Util\UserManipulator as BaseManipulator;

class UserManipulator extends BaseManipulator
{
    private $userManager;
    private $tokenGenerator;

    /**
     * {@inheritdoc}
     */
    public function __construct(UserManagerInterface $userManager, $tokenGenerator)
    {
        $this->userManager = $userManager;
        $this->tokenGenerator = $tokenGenerator;

        parent::__construct($userManager);
    }

    /**
     * {@inheritdoc}
     */
    public function create($username, $password, $email, $active, $superadmin)
    {
        $user = parent::create($username, $password, $email, $active, $superadmin);
<commit_msg>[latest-fosub] Add a type hint for TokenGenerator to UserManipulator<commit_after><?php

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

namespace Packagist\WebBundle\Util;

use FOS\UserBundle\Model\UserManagerInterface;
use FOS\UserBundle\Util\TokenGeneratorInterface;
use FOS\UserBundle\Util\UserManipulator as BaseManipulator;

class UserManipulator extends BaseManipulator
{
    private $userManager;
    private $tokenGenerator;

    /**
     * {@inheritdoc}
     */
    public function __construct(UserManagerInterface $userManager, TokenGeneratorInterface $tokenGenerator)
    {
        $this->userManager = $userManager;
        $this->tokenGenerator = $tokenGenerator;

        parent::__construct($userManager);
    }

    /**
     * {@inheritdoc}
     */
    public function create($username, $password, $email, $active, $superadmin)
    {
        $user = parent::create($username, $password, $email, $active, $superadmin);

{'fraction_non_alphanumeric': 0.11795606494746896, 'fraction_numerical': 0.0, 'mean_word_length': 3.6145374449339207, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, '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': '1078616', 'n_tokens_mistral': 610, 'n_tokens_neox': 604, 'n_words': 155}