Skip to content
Snippets Groups Projects
Commit 6fbed43f authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Amélioration du templace command

parent 65426743
Branches
No related tags found
No related merge requests found
Pipeline #32058 failed
...@@ -2,19 +2,22 @@ ...@@ -2,19 +2,22 @@
namespace <namespace>; namespace <namespace>;
use Symfony\Component\Console\Command\Command as SymfonyCommand; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
/** /**
* Description of <classname> * Description of <classname>
* *
* @author <author> * @author <author>
*/ */
class <classname> extends SymfonyCommand class <classname> extends Command
{ {
protected function execute(InputInterface $input, OutputInterface $output): int protected function execute(InputInterface $input, OutputInterface $output): int
{ {
$io = new SymfonyStyle($input, $output);
// ... put here the code to create the user // ... put here the code to create the user
// this method must return an integer number with the "exit status code" // this method must return an integer number with the "exit status code"
...@@ -22,7 +25,7 @@ class <classname> extends SymfonyCommand ...@@ -22,7 +25,7 @@ class <classname> extends SymfonyCommand
// return this if there was no problem running the command // return this if there was no problem running the command
// (it's equivalent to returning int(0)) // (it's equivalent to returning int(0))
return SymfonyCommand::SUCCESS; return Command::SUCCESS;
// or return this if some error happened during the execution // or return this if some error happened during the execution
// (it's equivalent to returning int(1)) // (it's equivalent to returning int(1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment