diff --git a/src/Command/LSCacheClearCommand.php b/src/Command/LSCacheClearCommand.php index 8781a49..31fcee2 100644 --- a/src/Command/LSCacheClearCommand.php +++ b/src/Command/LSCacheClearCommand.php @@ -49,11 +49,12 @@ protected function fire(): int ]; $paths = $this->input->getOption('path'); - if (!empty($paths)) { + if (! empty($paths)) { $options['query']['paths'] = $paths; } $client = new Client(); + try { //GET does not require the Flarum API key $client->request('GET', $this->url->to('api')->route('lscache.purge'), $options); @@ -65,7 +66,7 @@ protected function fire(): int } $this->deleteKey(); - $this->info('Notified LiteSpeed Web Server to purge' . (empty($paths) ? ' all' : '') . ' LSCache entries'); + $this->info('Notified LiteSpeed Web Server to purge'.(empty($paths) ? ' all' : '').' LSCache entries'); return 0; }