<commit_before><?php

namespace Pum\Bundle\AppBundle\DataFixtures\ORM;

use Doctrine\Common\Persistence\ObjectManager;
use Pum\Bundle\AppBundle\Entity\Permission;

class LoadPermissionData extends Fixture
{
    public function getOrder()
    {
        return 3; //depend on project
    }

    public function load(ObjectManager $manager)
    {
        $adminGroup      = $manager->merge($this->getReference('group:admin'));
        $frenchProject   = $manager->merge($this->getReference('project:french-team'));
        $englishProject  = $manager->merge($this->getReference('project:english-team'));

        $permission1 = new Permission();
        $permission1
            ->setGroup($adminGroup)
            ->setAttribute('PUM_OBJ_MASTER')
            ->setProject($frenchProject)
        ;
        $adminGroup->addAdvancedPermission($permission1);

        $permission2 = new Permission();
        $permission2
            ->setGroup($adminGroup)
            ->setAttribute('PUM_OBJ_MASTER')
            ->setProject($englishProject)
        ;
        $adminGroup->addAdvancedPermission($permission2);

        $manager->persist($permission1);
        $manager->persist($permission2);
        $manager->persist($adminGroup);
        $manager->flush();
    }
}<commit_msg>add missing fixture<commit_after><?php

namespace Pum\Bundle\AppBundle\DataFixtures\ORM;

use Doctrine\Common\Persistence\ObjectManager;
use Pum\Bundle\AppBundle\Entity\Permission;

class LoadPermissionData extends Fixture
{
    public function getOrder()
    {
        return 3; //depend on project
    }

    public function load(ObjectManager $manager)
    {
        $adminGroup      = $manager->merge($this->getReference('group:admin'));
        $newbieGroup     = $manager->merge($this->getReference('group:newbie'));
        $frenchProject   = $manager->merge($this->getReference('project:french-team'));
        $englishProject  = $manager->merge($this->getReference('project:english-team'));

        $permission1 = new Permission();
        $permission1
            ->setGroup($adminGroup)
            ->setAttribute('PUM_OBJ_MASTER')
            ->setProject($frenchProject)
        ;
        $adminGroup->addAdvancedPermission($permission1);

        $permission2 = new Permission();
        $permission2
            ->setGroup($adminGroup)
            ->setAttribute('PUM_OBJ_MASTER')
            ->setProject($englishProject)
        ;
        $adminGroup->addAdvancedPermission($permission2);

        $permission3 = new Permission();
        $permission3
            ->setGroup($newbieGroup)
            ->setAttribute('PUM_OBJ_VIEW')
            ->setProject($frenchProject)
        ;
        $newbieGroup->addAdvancedPermission($permission3);

        $manager->persist($permission1);
        $manager->persist($permission2);
        $manager->persist($permission3);
        $manager->persist($adminGroup);
        $manager->flush();
    }
}
{'fraction_non_alphanumeric': 0.13390119250425894, 'fraction_numerical': 0.007495741056218058, 'mean_word_length': 2.7689345314505776, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 46, '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': '4823326', 'n_tokens_mistral': 808, 'n_tokens_neox': 787, 'n_words': 111}