Use command default name

This commit is contained in:
Oliver Davies 2020-01-12 20:01:31 +00:00
parent 4083ef802b
commit b9dfa9bd7e
2 changed files with 2 additions and 3 deletions

View file

@ -14,5 +14,5 @@ $container = new Container();
/** @var Application $application */
$application = $container->get(Application::class);
$application->setDefaultCommand(GenerateCommand::NAME);
$application->setDefaultCommand(GenerateCommand::getDefaultName());
$application->run();

View file

@ -13,7 +13,7 @@ use Symfony\Component\Filesystem\Filesystem;
class GenerateCommand extends Command
{
const NAME = 'generate';
protected static $defaultName = 'generate';
/**
* {@inheritdoc}
@ -21,7 +21,6 @@ class GenerateCommand extends Command
public function configure()
{
$this
->setName(self::NAME)
->setDescription('Generates XML for Gmail filters.')
->addOption('input-file', 'i', InputOption::VALUE_OPTIONAL, 'The name of the PHP file containing your filters.', 'filters.php')
->addOption('output-file', 'o', InputOption::VALUE_OPTIONAL, 'The name of the XML file to generate.')