Add the type option

This commit is contained in:
Oliver Davies 2024-02-19 08:00:00 +00:00
parent 1907dde82f
commit 4906322e41

13
versa
View file

@ -7,7 +7,18 @@ use Symfony\Component\Console\SingleCommandApplication;
$application = new SingleCommandApplication();
$application->setCode(function (): int {
$application->addOption(
name: 'type',
mode: InputArgument::OPTIONAL,
description: 'The project type',
suggestedValues: ['drupal', 'sculpin'],
);
$application->setCode(function (InputInterface $input): int {
dd(
$input->getOption('type'),
);
return 0;
});