<commit_before><?php

namespace SfVlc\UserBundle\Factory;

use Doctrine\Common\Persistence\ObjectManager;
use BladeTester\HandyTestsBundle\Model\FactoryInterface;

class UserFactory implements FactoryInterface {

    private $om;

    public function __construct(ObjectManager $om) {
        $this->om = $om;
    }


    public function getName()
    {
        return 'User';
    }


    public function build(array $attributes)
    {
        $manager = $attributes['manager'];
        $user = $manager->createUser();
        $this->setDefaultFields($user, $attributes);
        $this->addRolesToUser($user, $attributes);
        $manager->updateUser($user);<commit_msg>Fix build method from UserFactory<commit_after><?php

namespace SfVlc\UserBundle\Factory;

use Doctrine\Common\Persistence\ObjectManager;
use BladeTester\HandyTestsBundle\Model\FactoryInterface;

class UserFactory implements FactoryInterface {

    private $om;

    public function __construct(ObjectManager $om) {
        $this->om = $om;
    }


    public function getName()
    {
        return 'User';
    }


    public function build(array $attributes)
    {
        $manager = $attributes['manager'];
        $user = $manager->createUser();
        $this->setDefaultFields($user, $attributes);
        $this->addRolesToUser($user, $attributes);
        $manager->updateUser($user, false);
{'fraction_non_alphanumeric': 0.12070226773957571, 'fraction_numerical': 0.0, 'mean_word_length': 3.329113924050633, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5649450', 'n_tokens_mistral': 394, 'n_tokens_neox': 383, 'n_words': 78}