diff --git a/.gitignore b/.gitignore index 2c1fc0c..04405ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /vendor composer.phar composer.lock -.DS_Store \ No newline at end of file +.DS_Store +.idea/* \ No newline at end of file diff --git a/src/Console/Clear.php b/src/Console/Clear.php index def9508..9bf4256 100644 --- a/src/Console/Clear.php +++ b/src/Console/Clear.php @@ -20,8 +20,18 @@ class Clear extends Command */ protected $description = 'Clear GeoIP cached locations.'; + /** + * Execute the console command for Laravel 5.5 and newer. + * @return void + */ + public function handle() + { + $this->fire(); + } + /** * Execute the console command. + * @return void */ public function fire() { @@ -40,7 +50,7 @@ public function fire() protected function isSupported() { return empty(app('geoip')->config('cache_tags')) === false - && in_array(config('cache.default'), ['file', 'database']) === false; + && in_array(config('cache.default'), ['file', 'database']) === false; } /** @@ -56,4 +66,4 @@ protected function performFlush() $this->output->writeln("complete"); } -} \ No newline at end of file +} diff --git a/src/Console/Update.php b/src/Console/Update.php index 13077ab..b0d36db 100644 --- a/src/Console/Update.php +++ b/src/Console/Update.php @@ -20,6 +20,15 @@ class Update extends Command */ protected $description = 'Update GeoIP database files to the latest version'; + /** + * Execute the console command for Laravel 5.5 and newer. + * @return void + */ + public function handle() + { + $this->fire(); + } + /** * Execute the console command. * @@ -32,7 +41,7 @@ public function fire() // Ensure the selected service supports updating if (method_exists($service, 'update') === false) { - $this->info('The current service "' . get_class($service). '" does not support updating.'); + $this->info('The current service "' . get_class($service) . '" does not support updating.'); return; } @@ -41,9 +50,8 @@ public function fire() // Perform update if ($result = $service->update()) { $this->info($result); - } - else { + } else { $this->error('Update failed!'); } } -} \ No newline at end of file +}