|
11 | 11 |
|
12 | 12 | namespace AppBundle\Command;
|
13 | 13 |
|
| 14 | +use AppBundle\Entity\User; |
| 15 | +use Doctrine\Common\Persistence\ObjectManager; |
14 | 16 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
15 | 17 | use Symfony\Component\Console\Input\InputArgument;
|
16 | 18 | use Symfony\Component\Console\Input\InputInterface;
|
17 | 19 | use Symfony\Component\Console\Input\InputOption;
|
18 | 20 | use Symfony\Component\Console\Output\OutputInterface;
|
19 | 21 | use Symfony\Component\Console\Question\Question;
|
20 |
| -use Doctrine\Common\Persistence\ObjectManager; |
21 |
| -use AppBundle\Entity\User; |
22 | 22 |
|
23 | 23 | /**
|
24 | 24 | * A command console that creates users and stores them in the database.
|
| 25 | + * |
25 | 26 | * To use this command, open a terminal window, enter into your project
|
26 | 27 | * directory and execute the following:
|
27 | 28 | *
|
@@ -204,7 +205,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
|
204 | 205 | $finishTime = microtime(true);
|
205 | 206 | $elapsedTime = $finishTime - $startTime;
|
206 | 207 |
|
207 |
| - $output->writeln(sprintf('[INFO] New user database id: %d / Elapsed time: %.2f ms', $user->getId(), $elapsedTime*1000)); |
| 208 | + $output->writeln(sprintf('[INFO] New user database id: %d / Elapsed time: %.2f ms', $user->getId(), $elapsedTime * 1000)); |
208 | 209 | }
|
209 | 210 | }
|
210 | 211 |
|
@@ -253,7 +254,7 @@ public function emailValidator($email)
|
253 | 254 | */
|
254 | 255 | private function getCommandHelp()
|
255 | 256 | {
|
256 |
| - return <<<HELP |
| 257 | + return <<<'HELP' |
257 | 258 | The <info>%command.name%</info> command creates new users and saves them in the database:
|
258 | 259 |
|
259 | 260 | <info>php %command.full_name%</info> <comment>username password email</comment>
|
|
0 commit comments