@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | /** |
| 139 | 139 | * Create an instance of the loader and load the configuration in one step. |
| 140 | 140 | * |
| 141 | - * @param LaravelApplication|LumenApplication $app The current application |
|
| 141 | + * @param \Illuminate\Contracts\Foundation\Application $app The current application |
|
| 142 | 142 | * instance that provides context and services needed to load the |
| 143 | 143 | * appropriate configuration. |
| 144 | 144 | * |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | * This helper method enables the package's service providers to get config |
| 204 | 204 | * values without having to resolve the config service from the container. |
| 205 | 205 | * |
| 206 | - * @param string|array $key The key(s) for the value(s) to fetch. |
|
| 206 | + * @param string $key The key(s) for the value(s) to fetch. |
|
| 207 | 207 | * @param mixed $default Returned if the key does not exist. |
| 208 | 208 | * |
| 209 | 209 | * @return mixed The requested configuration value or the provided default |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | */ |
| 323 | 323 | protected function setSessionConfiguration() |
| 324 | 324 | { |
| 325 | - if (! $this->supportsSessions |
|
| 325 | + if (!$this->supportsSessions |
|
| 326 | 326 | || $this->config->get('session.driver') !== 'redis-sentinel' |
| 327 | 327 | || $this->config->get('session.connection') !== null |
| 328 | 328 | ) { |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | protected function mergePackageConfiguration() |
| 358 | 358 | { |
| 359 | 359 | $defaultConfig = require self::CONFIG_PATH; |
| 360 | - $currentConfig = $this->config->get('redis-sentinel', [ ]); |
|
| 360 | + $currentConfig = $this->config->get('redis-sentinel', []); |
|
| 361 | 361 | |
| 362 | 362 | $this->packageConfig = array_merge($defaultConfig, $currentConfig); |
| 363 | 363 | } |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | { |
| 373 | 373 | $connections = $this->config->get('database.redis-sentinel'); |
| 374 | 374 | |
| 375 | - if (! is_array($connections)) { |
|
| 375 | + if (!is_array($connections)) { |
|
| 376 | 376 | return; |
| 377 | 377 | } |
| 378 | 378 | |
@@ -44,11 +44,11 @@ |
||
| 44 | 44 | * @return PredisConnection The Sentinel connection containing a configured |
| 45 | 45 | * Predis Client |
| 46 | 46 | */ |
| 47 | - public function connect(array $server, array $options = [ ]) |
|
| 47 | + public function connect(array $server, array $options = []) |
|
| 48 | 48 | { |
| 49 | 49 | // Merge the global options shared by all Sentinel connections with |
| 50 | 50 | // connection-specific options |
| 51 | - $clientOpts = array_merge($options, Arr::pull($server, 'options', [ ])); |
|
| 51 | + $clientOpts = array_merge($options, Arr::pull($server, 'options', [])); |
|
| 52 | 52 | |
| 53 | 53 | // Automatically set "replication" to "sentinel". This is the Sentinel |
| 54 | 54 | // driver, after all. |
@@ -69,13 +69,13 @@ |
||
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * Register the core Redis Sentinel connection manager. |
|
| 74 | - * |
|
| 75 | - * @return void |
|
| 76 | - */ |
|
| 77 | - protected function registerServices() |
|
| 78 | - { |
|
| 72 | + /** |
|
| 73 | + * Register the core Redis Sentinel connection manager. |
|
| 74 | + * |
|
| 75 | + * @return void |
|
| 76 | + */ |
|
| 77 | + protected function registerServices() |
|
| 78 | + { |
|
| 79 | 79 | $this->app->singleton('redis-sentinel', function ($app) { |
| 80 | 80 | $class = $this->config->getVersionedRedisSentinelManagerClass(); |
| 81 | 81 | $config = $this->config->get('database.redis-sentinel', [ ]); |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | { |
| 79 | 79 | $this->app->singleton('redis-sentinel', function ($app) { |
| 80 | 80 | $class = $this->config->getVersionedRedisSentinelManagerClass(); |
| 81 | - $config = $this->config->get('database.redis-sentinel', [ ]); |
|
| 81 | + $config = $this->config->get('database.redis-sentinel', []); |
|
| 82 | 82 | $driver = Arr::pull($config, 'client', 'predis'); |
| 83 | 83 | |
| 84 | 84 | return new RedisSentinelManager(new $class($driver, $config)); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * @param Client $client The Redis client to wrap. |
| 45 | 45 | * @param array $sentinelOptions Sentinel-specific connection options. |
| 46 | 46 | */ |
| 47 | - public function __construct(Client $client, array $sentinelOptions = [ ]) |
|
| 47 | + public function __construct(Client $client, array $sentinelOptions = []) |
|
| 48 | 48 | { |
| 49 | 49 | parent::__construct($client); |
| 50 | 50 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | foreach ($sentinelOptions as $option => $value) { |
| 54 | 54 | DynamicMethod::parseFromUnderscore($option) |
| 55 | 55 | ->prepend('set') |
| 56 | - ->callOn($this, [ $value ]); |
|
| 56 | + ->callOn($this, [$value]); |
|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |