Completed
Push — 1.x ( 14dc27...6cf2d0 )
by Cy
01:24
created
src/RedisSentinelDatabase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
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
 }
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.
src/Configuration/Loader.php 2 patches
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.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
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
@@ -67,7 +67,7 @@
 block discarded – undo
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
         });
Please login to merge, or discard this patch.