Completed
Push — 2.x ( 12d966...12ded9 )
by Cy
04:55
created
src/Connectors/PredisConnector.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
      * @return PredisConnection The Sentinel connection containing a configured
46 46
      * Predis Client
47 47
      */
48
-    public function connect(array $server, array $options = [ ])
48
+    public function connect(array $server, array $options = [])
49 49
     {
50 50
         // Merge the global options shared by all Sentinel connections with
51 51
         // connection-specific options
52
-        $clientOpts = array_merge($options, Arr::pull($server, 'options', [ ]));
52
+        $clientOpts = array_merge($options, Arr::pull($server, 'options', []));
53 53
 
54 54
         // Automatically set "replication" to "sentinel". This is the Sentinel
55 55
         // driver, after all.
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         foreach ($sentinelOpts as $option => $value) {
92 92
             DynamicMethod::parseFromUnderscore($option)
93 93
                 ->prepend('set')
94
-                ->callOn($connection, [ $value ]);
94
+                ->callOn($connection, [$value]);
95 95
         }
96 96
 
97 97
         return $client;
Please login to merge, or discard this patch.
src/Manager/VersionedRedisSentinelManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     protected function resolveConnection($name = null)
37 37
     {
38 38
         $name = $name ?: 'default';
39
-        $options = Arr::get($this->config, 'options', [ ]);
39
+        $options = Arr::get($this->config, 'options', []);
40 40
 
41 41
         if (isset($this->config[$name])) {
42 42
             return $this->connector()->connect($this->config[$name], $options);
Please login to merge, or discard this patch.
src/RedisSentinelServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
src/Configuration/Loader.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function loadConfiguration()
153 153
     {
154
-        if (! $this->shouldLoadConfiguration()) {
154
+        if (!$this->shouldLoadConfiguration()) {
155 155
             return;
156 156
         }
157 157
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     protected function setSessionConfiguration()
265 265
     {
266
-        if (! $this->supportsSessions
266
+        if (!$this->supportsSessions
267 267
             || $this->config->get('session.driver') !== 'redis-sentinel'
268 268
             || $this->config->get('session.connection') !== null
269 269
         ) {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     protected function mergePackageConfiguration()
299 299
     {
300 300
         $defaultConfig = require self::CONFIG_PATH;
301
-        $currentConfig = $this->config->get('redis-sentinel', [ ]);
301
+        $currentConfig = $this->config->get('redis-sentinel', []);
302 302
 
303 303
         $this->packageConfig = array_merge($defaultConfig, $currentConfig);
304 304
     }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     {
314 314
         $connections = $this->config->get('database.redis-sentinel');
315 315
 
316
-        if (! is_array($connections)) {
316
+        if (!is_array($connections)) {
317 317
             return;
318 318
         }
319 319
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
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
      *
Please login to merge, or discard this patch.
src/Configuration/HostNormalizer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.