We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cfc2a1 commit e176065Copy full SHA for e176065
packages/guides-cli/src/Application.php
@@ -15,7 +15,9 @@
15
16
use Symfony\Component\Console\Application as BaseApplication;
17
use Symfony\Component\Console\Command\Command;
18
+use Symfony\Component\Console\Input\InputArgument;
19
use Symfony\Component\Console\Input\InputDefinition;
20
+use Symfony\Component\Console\Input\InputInterface;
21
use Symfony\Component\Console\Input\InputOption;
22
23
use function count;
@@ -63,4 +65,13 @@ protected function getDefaultInputDefinition(): InputDefinition
63
65
64
66
return $definition;
67
}
68
+
69
+ protected function getCommandName(InputInterface $input): string|null
70
+ {
71
+ if ($input->getArgument('command') === null) {
72
+ return 'run';
73
+ }
74
75
+ return $input->getArgument('command');
76
77
0 commit comments