<commit_before><?php

/**
 * This file is part of the Symfony framework.
 *
 * (c) <NAME> <<EMAIL>>
 * (c) <NAME> <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Bundle\DoctrineUserBundle\Entity;
use Doctrine\ORM\EntityRepository;
use Bundle\DoctrineUserBundle\DAO\UserRepositoryInterface;

class UserRepository extends EntityRepository implements UserRepositoryInterface
{
    /**
     * @see UserRepositoryInterface::createUser
     */
    public function createUser($username, $password, $isActive = true, $isSuperAdmin = false)
    {
        $user = new User();

        $user->setUsername($username);
        $user->setPassword($password);
        $user->setIsActive($isActive);
        $user->setIsSuperAdmin($isSuperAdmin);

        $em = $this->getEntityManager();
        $em->persist($user);
        $em->flush();

        return $user;
    }
<commit_msg>Update ORM implementation of the UserRepository<commit_after><?php

/**
 * This file is part of the Symfony framework.
 *
 * (c) <NAME> <<EMAIL>>
 * (c) <NAME> <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Bundle\DoctrineUserBundle\Entity;
use Doctrine\ORM\EntityRepository;
use Bundle\DoctrineUserBundle\DAO\UserRepositoryInterface;

class UserRepository extends EntityRepository implements UserRepositoryInterface
{
{'fraction_non_alphanumeric': 0.11580381471389646, 'fraction_numerical': 0.0, 'mean_word_length': 3.816393442622951, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 22, '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': '7215688', 'n_tokens_mistral': 417, 'n_tokens_neox': 409, 'n_words': 122}