From b9dfa9bd7eca86e19391484d3c4c02d5ba9c1353 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 12 Jan 2020 20:01:31 +0000 Subject: [PATCH] Use command default name --- bin/generate-filters.php | 2 +- src/Console/Command/GenerateCommand.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/generate-filters.php b/bin/generate-filters.php index d3b85e8..e1c53f8 100755 --- a/bin/generate-filters.php +++ b/bin/generate-filters.php @@ -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(); diff --git a/src/Console/Command/GenerateCommand.php b/src/Console/Command/GenerateCommand.php index 83fe957..f11906e 100644 --- a/src/Console/Command/GenerateCommand.php +++ b/src/Console/Command/GenerateCommand.php @@ -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.')