Refactor to separate commands

This commit is contained in:
Oliver Davies 2024-02-21 12:48:33 +00:00
parent 1350899e8f
commit b4e7a71fe3
7 changed files with 271 additions and 159 deletions

View file

@ -0,0 +1,35 @@
<?php
namespace App\Console\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
abstract class AbstractCommand extends Command
{
protected function configure(): void
{
$this->addOption(
name: 'extra-args',
shortcut: 'a',
mode: InputArgument::OPTIONAL,
description: 'Any additonal arguments to pass to the command.',
);
$this->addOption(
name: 'type',
shortcut: 't',
mode: InputArgument::OPTIONAL,
description: 'The project type',
suggestedValues: ['drupal', 'sculpin'],
);
$this->addOption(
name: 'working-dir',
shortcut: 'd',
mode: InputArgument::OPTIONAL,
description: 'The project\'s working directory',
default: '.',
);
}
}