<commit_before><?php

namespace SWP\BackendBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

use SWP\BackendBundle\Entity\User;

class UserCommand extends ContainerAwareCommand
{
    protected function configure()
    {
        $this
            ->setName('user:create')
            ->setDescription('Create a new user')
            ->addArgument(
                'email',
                InputArgument::OPTIONAL,
                'Please give the email of the new user'
            )
            ->addArgument(
               'password',
               InputArgument::OPTIONAL,
               'Set the new password of the user'
            )
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $email    = $input->getArgument('email');
        $password = $input->getArgument('password');

        $factory = $this->getContainer()->get('security.encoder_factory');
        $user    = new User();<commit_msg>fixed #53, email is now required instead of optional<commit_after><?php

namespace SWP\BackendBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

use SWP\BackendBundle\Entity\User;

class UserCommand extends ContainerAwareCommand
{
    protected function configure()
    {
        $this
            ->setName('user:create')
            ->setDescription('Create a new user')
            ->addArgument(
                'email',
                InputArgument::REQUIRED,
                'Please give the email of the new user'
            )
            ->addArgument(
               'password',
               InputArgument::OPTIONAL,
               'Set the new password of the user'
            )
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $email    = $input->getArgument('email');
        $password = $input->getArgument('password');

        $factory = $this->getContainer()->get('security.encoder_factory');
        $user    = new User();
{'fraction_non_alphanumeric': 0.10463632496809869, 'fraction_numerical': 0.0008507018290089324, 'mean_word_length': 2.345661450924609, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1360854', 'n_tokens_mistral': 594, 'n_tokens_neox': 592, 'n_words': 131}