@@ -119,7 +119,7 @@ |
||
| 119 | 119 | foreach ($sentinelOpts as $option => $value) { |
| 120 | 120 | DynamicMethod::parseFromUnderscore($option) |
| 121 | 121 | ->prepend('set') |
| 122 | - ->callOn($connection, [ $value ]); |
|
| 122 | + ->callOn($connection, [$value]); |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public static function normalizeConnection(array $connection) |
| 85 | 85 | { |
| 86 | - $normal = [ ]; |
|
| 86 | + $normal = []; |
|
| 87 | 87 | |
| 88 | 88 | if (array_key_exists('options', $connection)) { |
| 89 | 89 | $normal['options'] = $connection['options']; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | return static::normalizeHostString($host); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - return [ $host ]; |
|
| 120 | + return [$host]; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
@@ -132,8 +132,8 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | protected static function normalizeHostArray(array $hostArray) |
| 134 | 134 | { |
| 135 | - if (! array_key_exists('host', $hostArray)) { |
|
| 136 | - return [ $hostArray ]; |
|
| 135 | + if (!array_key_exists('host', $hostArray)) { |
|
| 136 | + return [$hostArray]; |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | $port = Arr::get($hostArray, 'port', 26379); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | protected static function normalizeHostString($hostString, $port = 26379) |
| 157 | 157 | { |
| 158 | - $hosts = [ ]; |
|
| 158 | + $hosts = []; |
|
| 159 | 159 | |
| 160 | 160 | foreach (explode(',', $hostString) as $host) { |
| 161 | 161 | $host = trim($host); |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | if (Str::contains($host, ':')) { |
| 164 | 164 | $hosts[] = $host; |
| 165 | 165 | } else { |
| 166 | - $hosts[] = [ 'host' => $host, 'port' => $port ]; |
|
| 166 | + $hosts[] = ['host' => $host, 'port' => $port]; |
|
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | |
@@ -129,7 +129,7 @@ |
||
| 129 | 129 | /** |
| 130 | 130 | * Create an instance of the loader and load the configuration in one step. |
| 131 | 131 | * |
| 132 | - * @param LaravelApplication|LumenApplication $app The current application |
|
| 132 | + * @param \Illuminate\Contracts\Foundation\Application $app The current application |
|
| 133 | 133 | * instance that provides context and services needed to load the |
| 134 | 134 | * appropriate configuration. |
| 135 | 135 | * |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function loadConfiguration() |
| 145 | 145 | { |
| 146 | - if (! $this->shouldLoadConfiguration()) { |
|
| 146 | + if (!$this->shouldLoadConfiguration()) { |
|
| 147 | 147 | return; |
| 148 | 148 | } |
| 149 | 149 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | */ |
| 259 | 259 | protected function setSessionConfiguration() |
| 260 | 260 | { |
| 261 | - if (! $this->supportsSessions |
|
| 261 | + if (!$this->supportsSessions |
|
| 262 | 262 | || $this->config->get('session.driver') !== 'redis-sentinel' |
| 263 | 263 | || $this->config->get('session.connection') !== null |
| 264 | 264 | ) { |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | protected function mergePackageConfiguration() |
| 294 | 294 | { |
| 295 | 295 | $defaultConfig = require __DIR__ . '/../../config/redis-sentinel.php'; |
| 296 | - $currentConfig = $this->config->get('redis-sentinel', [ ]); |
|
| 296 | + $currentConfig = $this->config->get('redis-sentinel', []); |
|
| 297 | 297 | |
| 298 | 298 | $this->packageConfig = array_merge($defaultConfig, $currentConfig); |
| 299 | 299 | } |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | { |
| 309 | 309 | $connections = $this->config->get('database.redis-sentinel'); |
| 310 | 310 | |
| 311 | - if (! is_array($connections)) { |
|
| 311 | + if (!is_array($connections)) { |
|
| 312 | 312 | return; |
| 313 | 313 | } |
| 314 | 314 | |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $this->config = ConfigurationLoader::load($this->app); |
| 68 | 68 | |
| 69 | 69 | $this->app->singleton('redis-sentinel', function ($app) { |
| 70 | - $config = $app->make('config')->get('database.redis-sentinel', [ ]); |
|
| 70 | + $config = $app->make('config')->get('database.redis-sentinel', []); |
|
| 71 | 71 | |
| 72 | 72 | return new RedisSentinelDatabase($config); |
| 73 | 73 | }); |