diff options
author | Git'Fellow <carlos@reendex.com> | 2022-08-20 20:36:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-20 20:36:22 +0300 |
commit | c21fbf269f519a71528db994476421afa480f378 (patch) | |
tree | 078537f6fc63d774c03ceeaa6da9860393df22f0 /vendor/symfony/console/Command/ListCommand.php | |
parent | 0de81a2395ba6e08abf2a21f7e98eda8f592fcf2 (diff) | |
parent | 922f0792b15cce73797e7213579e00c6ddd47a97 (diff) |
Merge branch 'master' into updateDir
Signed-off-by: Git'Fellow <carlos@reendex.com>
Diffstat (limited to 'vendor/symfony/console/Command/ListCommand.php')
-rw-r--r-- | vendor/symfony/console/Command/ListCommand.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php index 179ddea..44324a5 100644 --- a/vendor/symfony/console/Command/ListCommand.php +++ b/vendor/symfony/console/Command/ListCommand.php @@ -13,10 +13,10 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Helper\DescriptorHelper; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Input\InputDefinition; /** * ListCommand displays the list of all available commands for the application. @@ -33,7 +33,7 @@ class ListCommand extends Command $this ->setName('list') ->setDefinition($this->createDefinition()) - ->setDescription('Lists commands') + ->setDescription('List commands') ->setHelp(<<<'EOF' The <info>%command.name%</info> command lists all commands: @@ -69,22 +69,21 @@ EOF protected function execute(InputInterface $input, OutputInterface $output) { $helper = new DescriptorHelper(); - $helper->describe($output, $this->getApplication(), array( + $helper->describe($output, $this->getApplication(), [ 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace'), - )); + ]); + + return 0; } - /** - * {@inheritdoc} - */ - private function createDefinition() + private function createDefinition(): InputDefinition { - return new InputDefinition(array( + return new InputDefinition([ new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - )); + ]); } } |