diff --git a/src/CacheAwareConnectionProxy.php b/src/CacheAwareConnectionProxy.php index 40e1aac..e637a7b 100644 --- a/src/CacheAwareConnectionProxy.php +++ b/src/CacheAwareConnectionProxy.php @@ -2,6 +2,10 @@ namespace Laragear\CacheQuery; +use function array_shift; +use function base64_encode; +use function cache; +use function config; use DateInterval; use DateTimeInterface; use Illuminate\Cache\NoLock; @@ -9,12 +13,8 @@ use Illuminate\Contracts\Cache\LockProvider; use Illuminate\Contracts\Cache\Repository; use Illuminate\Database\ConnectionInterface; -use LogicException; -use function array_shift; -use function base64_encode; -use function cache; -use function config; use function implode; +use LogicException; use function md5; class CacheAwareConnectionProxy @@ -115,7 +115,7 @@ protected function getQueryHash(string $query, array $bindings): string */ protected function retrieveLock(string $key): Lock { - if (!$this->lockWait) { + if (! $this->lockWait) { return new NoLock($key, $this->lockWait); } @@ -191,7 +191,7 @@ protected static function store(?string $store, bool $lockable = false): Reposit { $repository = cache()->store($store ?? config('cache-query.store')); - if ($lockable && !$repository->getStore() instanceof LockProvider) { + if ($lockable && ! $repository->getStore() instanceof LockProvider) { $store ??= cache()->getDefaultDriver(); throw new LogicException("The [$store] cache does not support atomic locks."); diff --git a/src/CacheQueryServiceProvider.php b/src/CacheQueryServiceProvider.php index b65b3e1..7594847 100644 --- a/src/CacheQueryServiceProvider.php +++ b/src/CacheQueryServiceProvider.php @@ -47,7 +47,7 @@ public function boot(): void $this->publishes([static::STUBS => $this->app->basePath('.stubs/cache-query.php')], 'phpstorm'); $this->commands([ - Console\Commands\CacheQuery\Forget::class + Console\Commands\CacheQuery\Forget::class, ]); } } diff --git a/src/Console/Commands/CacheQuery/Forget.php b/src/Console/Commands/CacheQuery/Forget.php index eaf81c7..c4ac601 100644 --- a/src/Console/Commands/CacheQuery/Forget.php +++ b/src/Console/Commands/CacheQuery/Forget.php @@ -64,7 +64,7 @@ protected function retrieveKey(ConfigContract $config): array { return [ $this->argument('key'), - (string) str($config->get('cache-query.prefix'))->finish('|')->append($this->argument('key')) + (string) str($config->get('cache-query.prefix'))->finish('|')->append($this->argument('key')), ]; } }