<commit_before><?php

/*
 * User Bundle
 * This file is part of the BardisCMS.
 *
 * Sample fixtures to load with and admin/admin user with role ROLE_SUPER_ADMIN
 *
 * (c) <NAME> <<EMAIL>>
 *
 */

namespace Application\Sonata\UserBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Application\Sonata\UserBundle\Entity\User;

class UserFixtures extends AbstractFixture implements OrderedFixtureInterface {

    public function load(ObjectManager $manager) {
        $admin = new User();
        $admin->setCreatedAt(new \DateTime());
        $admin->setUpdatedAt(new \DateTime());
        $admin->setUsername('admin');
        $admin->setUsernameCanonical('admin');
        $admin->setEmail('<EMAIL>');
        $admin->setEmailCanonical('<EMAIL>');
        $admin->setEnabled(1);
        $admin->setPlainPassword('<PASSWORD>');
        $admin->setSuperAdmin(true);
        //$admin->addRole(static::ROLE_SUPER_ADMIN);
        $manager->persist($admin);

        $manager->flush();

        $this->addReference('admin', $admin);
    }

    public function getOrder() {
        return 0;
    }

}
<commit_msg>fixing the sample user fixtures to adhere to the new user field restrictions<commit_after><?php

/*
 * User Bundle
 * This file is part of the BardisCMS.
 *
 * Sample fixtures to load with and admin/admin user with role ROLE_SUPER_ADMIN
 *
 * (c) <NAME> <<EMAIL>>
 *
 */

namespace Application\Sonata\UserBundle\DataFixtures\ORM;

use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Application\Sonata\UserBundle\Entity\User;

class UserFixtures extends AbstractFixture implements OrderedFixtureInterface {

    public function load(ObjectManager $manager) {
        $admin = new User();
        $admin->setCreatedAt(new \DateTime());
        $admin->setUpdatedAt(new \DateTime());
        $admin->setUsername('admin');
        $admin->setUsernameCanonical('admin');
        $admin->setEmail('<EMAIL>');
        $admin->setEmailCanonical('<EMAIL>');
        $admin->setEnabled(1);
        $admin->setPlainPassword('<PASSWORD>');
        $admin->setConfirmed(true);
        $admin->setSuperAdmin(true);
        //$admin->addRole(static::ROLE_SUPER_ADMIN);
        $manager->persist($admin);

        $manager->flush();

        $this->addReference('admin', $admin);
    }

    public function getOrder() {
        return 0;
    }

}

{'fraction_non_alphanumeric': 0.13726250484683986, 'fraction_numerical': 0.0015509887553315238, 'mean_word_length': 3.5026178010471205, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 42, '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': '6816700', 'n_tokens_mistral': 781, 'n_tokens_neox': 758, 'n_words': 149}