comparison vendor/symfony/console/Command/ListCommand.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
11 11
12 namespace Symfony\Component\Console\Command; 12 namespace Symfony\Component\Console\Command;
13 13
14 use Symfony\Component\Console\Helper\DescriptorHelper; 14 use Symfony\Component\Console\Helper\DescriptorHelper;
15 use Symfony\Component\Console\Input\InputArgument; 15 use Symfony\Component\Console\Input\InputArgument;
16 use Symfony\Component\Console\Input\InputDefinition;
17 use Symfony\Component\Console\Input\InputInterface;
16 use Symfony\Component\Console\Input\InputOption; 18 use Symfony\Component\Console\Input\InputOption;
17 use Symfony\Component\Console\Input\InputInterface;
18 use Symfony\Component\Console\Output\OutputInterface; 19 use Symfony\Component\Console\Output\OutputInterface;
19 use Symfony\Component\Console\Input\InputDefinition;
20 20
21 /** 21 /**
22 * ListCommand displays the list of all available commands for the application. 22 * ListCommand displays the list of all available commands for the application.
23 * 23 *
24 * @author Fabien Potencier <fabien@symfony.com> 24 * @author Fabien Potencier <fabien@symfony.com>
67 * {@inheritdoc} 67 * {@inheritdoc}
68 */ 68 */
69 protected function execute(InputInterface $input, OutputInterface $output) 69 protected function execute(InputInterface $input, OutputInterface $output)
70 { 70 {
71 $helper = new DescriptorHelper(); 71 $helper = new DescriptorHelper();
72 $helper->describe($output, $this->getApplication(), array( 72 $helper->describe($output, $this->getApplication(), [
73 'format' => $input->getOption('format'), 73 'format' => $input->getOption('format'),
74 'raw_text' => $input->getOption('raw'), 74 'raw_text' => $input->getOption('raw'),
75 'namespace' => $input->getArgument('namespace'), 75 'namespace' => $input->getArgument('namespace'),
76 )); 76 ]);
77 } 77 }
78 78
79 /** 79 /**
80 * {@inheritdoc} 80 * {@inheritdoc}
81 */ 81 */
82 private function createDefinition() 82 private function createDefinition()
83 { 83 {
84 return new InputDefinition(array( 84 return new InputDefinition([
85 new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), 85 new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'),
86 new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), 86 new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'),
87 new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), 87 new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),
88 )); 88 ]);
89 } 89 }
90 } 90 }