Commit 456e74de authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Corrige la signature des méthodes execute des commandes.

parent 2585f8a6
......@@ -46,6 +46,9 @@ class GenerateCommand extends Command
$this->container = $container;
}
/**
* {@inheritdoc}
*/
protected function configure(): void
{
$this
......@@ -55,9 +58,9 @@ class GenerateCommand extends Command
}
/**
* @SuppressWarnings(UnusedFormalParameter)
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$name = $input->getArgument('graph');
$serviceId = "irstea_plant_uml.graph.$name";
......@@ -70,5 +73,7 @@ class GenerateCommand extends Command
$graph = $this->container->get($serviceId);
$graph->visitAll();
$graph->writeTo($writer);
return 0;
}
}
......@@ -64,7 +64,7 @@ class ListCommand extends Command
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
foreach ($this->graphNames as $name) {
$output->writeln($name);
......
......@@ -108,7 +108,7 @@ class RenderCommand extends Command
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output): void
protected function execute(InputInterface $input, OutputInterface $output): int
{
$graphs = $input->getArgument('graph') ?: $this->graphNames;
$format = $input->getOption('format') ?: $this->defaultFormat;
......@@ -125,6 +125,8 @@ class RenderCommand extends Command
$this->renderGraph($graph, $target, $format, $io);
}
return 0;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment