Skip to content

Commit

Permalink
Default shortcuts to null (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon authored Jan 31, 2024
1 parent 33980da commit 4870c5e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Commands/DatabaseDeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand All @@ -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.');
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/EnvDeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand All @@ -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.');
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/RecordDeleteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand All @@ -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.');
Expand Down

0 comments on commit 4870c5e

Please sign in to comment.