From 4870c5e4f1fd582f6efe7c327bf17d65cb229a89 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Wed, 31 Jan 2024 16:52:33 +0000 Subject: [PATCH] Default shortcuts to null (#250) --- src/Commands/DatabaseDeleteCommand.php | 4 ++-- src/Commands/EnvDeleteCommand.php | 4 ++-- src/Commands/RecordDeleteCommand.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Commands/DatabaseDeleteCommand.php b/src/Commands/DatabaseDeleteCommand.php index f3ce550f..5ba98054 100644 --- a/src/Commands/DatabaseDeleteCommand.php +++ b/src/Commands/DatabaseDeleteCommand.php @@ -18,7 +18,7 @@ protected function configure() $this ->setName('database:delete') ->addArgument('database', InputArgument::REQUIRED, 'The database name / ID') - ->addOption('force', false, InputOption::VALUE_NONE, 'Force deletion of the database without confirmation') + ->addOption('force', null, InputOption::VALUE_NONE, 'Force deletion of the database without confirmation') ->setDescription('Delete a database'); } @@ -29,7 +29,7 @@ protected function configure() */ public function handle() { - $forceDeletion = $this->option('force', false); + $forceDeletion = $this->option('force'); if (! $forceDeletion && ! Helpers::confirm('Are you sure you want to delete this database', false)) { Helpers::abort('Action cancelled.'); diff --git a/src/Commands/EnvDeleteCommand.php b/src/Commands/EnvDeleteCommand.php index 93f2796f..34983179 100644 --- a/src/Commands/EnvDeleteCommand.php +++ b/src/Commands/EnvDeleteCommand.php @@ -20,7 +20,7 @@ protected function configure() $this ->setName('env:delete') ->addArgument('environment', InputArgument::REQUIRED, 'The environment name') - ->addOption('force', false, InputOption::VALUE_NONE, 'Force deletion of the environment without confirmation') + ->addOption('force', null, InputOption::VALUE_NONE, 'Force deletion of the environment without confirmation') ->setDescription('Delete an environment'); } @@ -33,7 +33,7 @@ public function handle() { $environment = $this->argument('environment'); - $forceDeletion = $this->option('force', false); + $forceDeletion = $this->option('force'); if (! $forceDeletion && ! Helpers::confirm("Are you sure you want to delete the [{$environment}] environment", false)) { Helpers::abort('Action cancelled.'); diff --git a/src/Commands/RecordDeleteCommand.php b/src/Commands/RecordDeleteCommand.php index 8871eea5..1d46b477 100644 --- a/src/Commands/RecordDeleteCommand.php +++ b/src/Commands/RecordDeleteCommand.php @@ -21,7 +21,7 @@ protected function configure() ->addArgument('type', InputArgument::REQUIRED, 'The record type') ->addArgument('name', InputArgument::OPTIONAL, 'The record name') ->addArgument('value', InputArgument::OPTIONAL, 'The record value') - ->addOption('force', false, InputOption::VALUE_NONE, 'Force deletion of the record without confirmation') + ->addOption('force', null, InputOption::VALUE_NONE, 'Force deletion of the record without confirmation') ->setDescription('Delete a DNS record'); } @@ -32,7 +32,7 @@ protected function configure() */ public function handle() { - $forceDeletion = $this->option('force', false); + $forceDeletion = $this->option('force'); if (! $forceDeletion && ! Helpers::confirm('Are you sure you want to delete this record', false)) { Helpers::abort('Action cancelled.');