@@ -104,7 +104,7 @@ |
||
104 | 104 | * Remove the standard Laravel Redis service from the bound deferred |
105 | 105 | * services so they don't overwrite Redis Sentinel registrations. |
106 | 106 | * |
107 | - * @return void |
|
107 | + * @return false|null |
|
108 | 108 | */ |
109 | 109 | protected function removeDeferredRedisServices() |
110 | 110 | { |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | $this->app->singleton('redis-sentinel', function ($app) { |
71 | 71 | $class = $this->getVersionedRedisSentinelManagerClass(); |
72 | - $config = $app->make('config')->get('database.redis-sentinel', [ ]); |
|
72 | + $config = $app->make('config')->get('database.redis-sentinel', []); |
|
73 | 73 | $driver = Arr::pull($config, 'client', 'predis'); |
74 | 74 | |
75 | 75 | return new RedisSentinelManager(new $class($driver, $config)); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function loadConfiguration() |
149 | 149 | { |
150 | - if (! $this->shouldLoadConfiguration()) { |
|
150 | + if (!$this->shouldLoadConfiguration()) { |
|
151 | 151 | return; |
152 | 152 | } |
153 | 153 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | */ |
260 | 260 | protected function setSessionConfiguration() |
261 | 261 | { |
262 | - if (! $this->supportsSessions |
|
262 | + if (!$this->supportsSessions |
|
263 | 263 | || $this->config->get('session.driver') !== 'redis-sentinel' |
264 | 264 | || $this->config->get('session.connection') !== null |
265 | 265 | ) { |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | protected function mergePackageConfiguration() |
295 | 295 | { |
296 | 296 | $defaultConfig = require self::CONFIG_PATH; |
297 | - $currentConfig = $this->config->get('redis-sentinel', [ ]); |
|
297 | + $currentConfig = $this->config->get('redis-sentinel', []); |
|
298 | 298 | |
299 | 299 | $this->packageConfig = array_merge($defaultConfig, $currentConfig); |
300 | 300 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | { |
341 | 341 | $connections = $this->config->get('database.redis-sentinel'); |
342 | 342 | |
343 | - if (! is_array($connections)) { |
|
343 | + if (!is_array($connections)) { |
|
344 | 344 | return; |
345 | 345 | } |
346 | 346 | |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | */ |
367 | 367 | protected function normalizeConnectionHosts(array $connection) |
368 | 368 | { |
369 | - $normalized = [ ]; |
|
369 | + $normalized = []; |
|
370 | 370 | |
371 | 371 | if (array_key_exists('options', $connection)) { |
372 | 372 | $normalized['options'] = $connection['options']; |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | return $this->normalizeHostString($host); |
401 | 401 | } |
402 | 402 | |
403 | - return [ $host ]; |
|
403 | + return [$host]; |
|
404 | 404 | } |
405 | 405 | |
406 | 406 | /** |
@@ -415,8 +415,8 @@ discard block |
||
415 | 415 | */ |
416 | 416 | protected function normalizeHostArray(array $hostArray) |
417 | 417 | { |
418 | - if (! array_key_exists('host', $hostArray)) { |
|
419 | - return [ $hostArray ]; |
|
418 | + if (!array_key_exists('host', $hostArray)) { |
|
419 | + return [$hostArray]; |
|
420 | 420 | } |
421 | 421 | |
422 | 422 | $port = Arr::get($hostArray, 'port', 26379); |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | */ |
439 | 439 | protected function normalizeHostString($hostString, $port = 26379) |
440 | 440 | { |
441 | - $hosts = [ ]; |
|
441 | + $hosts = []; |
|
442 | 442 | |
443 | 443 | foreach (explode(',', $hostString) as $host) { |
444 | 444 | $host = trim($host); |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | if (Str::contains($host, ':')) { |
447 | 447 | $hosts[] = $host; |
448 | 448 | } else { |
449 | - $hosts[] = [ 'host' => $host, 'port' => $port ]; |
|
449 | + $hosts[] = ['host' => $host, 'port' => $port]; |
|
450 | 450 | } |
451 | 451 | } |
452 | 452 |