This repository has been archived on 2025-08-17. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
versa/src/Console/Command/AbstractCommand.php

44 lines
1.1 KiB
PHP
Raw Normal View History

2024-02-21 12:48:33 +00:00
<?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: 'language',
shortcut: 'l',
mode: InputArgument::OPTIONAL,
description: 'The project language',
suggestedValues: ['php', 'javascript'],
);
2024-02-21 12:48:33 +00:00
$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: '.',
);
}
}