diff --git a/src/Illuminate/Console/ConfirmableTrait.php b/src/Illuminate/Console/ConfirmableTrait.php index 7172215303ab..9801ed795513 100644 --- a/src/Illuminate/Console/ConfirmableTrait.php +++ b/src/Illuminate/Console/ConfirmableTrait.php @@ -21,20 +21,22 @@ public function confirmToProceed($warning = 'Application In Production!', $callb $shouldConfirm = $callback instanceof Closure ? call_user_func($callback) : $callback; - if ($shouldConfirm) { - if ($this->option('force')) { - return true; - } + if (! $shouldConfirm) { + return true; + } + + if ($this->option('force')) { + return true; + } - $this->alert($warning); + $this->alert($warning); - $confirmed = $this->confirm('Do you really wish to run this command?'); + $confirmed = $this->confirm('Do you really wish to run this command?'); - if (! $confirmed) { - $this->comment('Command Cancelled!'); + if (! $confirmed) { + $this->comment('Command Cancelled!'); - return false; - } + return false; } return true;