diff --git a/src/Commands/ForgetSetting.php b/src/Commands/ForgetSetting.php index 2933752..5981721 100644 --- a/src/Commands/ForgetSetting.php +++ b/src/Commands/ForgetSetting.php @@ -29,16 +29,14 @@ class ForgetSetting extends Command /** * Execute the console command. * - * @return void + * @return int */ public function handle() { $key = $this->argument('key'); - $setting = setting(); - - if ($setting->has($key)) { - if ($setting->forget($key)) { + if (setting()->has($key)) { + if (setting()->forget($key)) { $this->info('Forget one or more settings successfully.'); return Command::SUCCESS; diff --git a/src/Commands/GetSetting.php b/src/Commands/GetSetting.php index 831a3a3..181d13e 100644 --- a/src/Commands/GetSetting.php +++ b/src/Commands/GetSetting.php @@ -31,7 +31,7 @@ class GetSetting extends Command /** * Execute the console command. * - * @return void + * @return int */ public function handle() { @@ -49,7 +49,7 @@ public function handle() } $settings = $this->formatSetting(Arr::dot($settings)); - $this->print($settings); + return $this->print($settings); } /** @@ -72,7 +72,7 @@ private function formatSetting($settings) * * @param Collection $settings * - * @return void + * @return int */ private function print($settings) { diff --git a/src/Commands/SetOrUpdateSetting.php b/src/Commands/SetOrUpdateSetting.php index 7c23a98..e7c8e13 100644 --- a/src/Commands/SetOrUpdateSetting.php +++ b/src/Commands/SetOrUpdateSetting.php @@ -30,7 +30,7 @@ class SetOrUpdateSetting extends Command /** * Execute the console command. * - * @return void + * @return int */ public function handle() {