Completed
Push — master ( ff64f1...3207fe )
by Kamil
13:26
created
src/Redis/Command/Api/ApiSetSortedInterface.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,6 @@
 block discarded – undo
66 66
      * @param $key
67 67
      * @param $star
68 68
      * @param $stop
69
-     * @param array $options
70 69
      * @return mixed
71 70
      */
72 71
     public function zRange($key, $star = 0, $stop = -1, $withScores = false);
Please login to merge, or discard this patch.
src/Redis/Command/Compose/ApiCoreTrait.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     {
104 104
         $command = Enum::INFO;
105 105
 
106
-        return $this->dispatch(Builder::build($command, $section))->then(function ($value) {
106
+        return $this->dispatch(Builder::build($command, $section))->then(function($value) {
107 107
             if ($value) {
108 108
                 $ret = explode("\r\n", $value);
109 109
                 $handled = [];
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 {
114 114
                     if (($pos = strpos($v, '#')) !== false)
115 115
                     {
116
-                        $lastKey = strtolower(substr($v,$pos+2));
116
+                        $lastKey = strtolower(substr($v, $pos + 2));
117 117
                         $handled[$lastKey] = [];
118 118
                         continue;
119 119
                     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,8 @@  discard block
 block discarded – undo
104 104
         $command = Enum::INFO;
105 105
 
106 106
         return $this->dispatch(Builder::build($command, $section))->then(function ($value) {
107
-            if ($value) {
107
+            if ($value)
108
+            {
108 109
                 $ret = explode("\r\n", $value);
109 110
                 $handled = [];
110 111
                 $lastKey = '';
@@ -117,7 +118,8 @@  discard block
 block discarded – undo
117 118
                         $handled[$lastKey] = [];
118 119
                         continue;
119 120
                     }
120
-                    if ($v === '') {
121
+                    if ($v === '')
122
+                    {
121 123
                         continue;
122 124
                     }
123 125
                     if (($statMap = explode(':', $v)) && $statMap[0] && $statMap[1])
Please login to merge, or discard this patch.
src/Redis/Command/Api/ApiKeyValInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      * @param int $end
22 22
      * @return mixed
23 23
      */
24
-    public function bitCount($key, $start=0, $end=-1);
24
+    public function bitCount($key, $start = 0, $end = -1);
25 25
 
26 26
     /**
27 27
      * @doc https://redis.io/commands/bitfield
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @param int $end
53 53
      * @return mixed
54 54
      */
55
-    public function bitPos($key, $bit, $start=0, $end=-1);
55
+    public function bitPos($key, $bit, $start = 0, $end = -1);
56 56
 
57 57
     /**
58 58
      * @doc https://redis.io/commands/decr
Please login to merge, or discard this patch.
src/Redis/Command/Compose/ApiSetSortedTrait.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
         $args = [$key, $star, $stop];
98 98
         if ($withScores) {
99 99
             $args[] = 'WITHSCORES';
100
-            return $this->dispatch(Builder::build($command, $args))->then(function ($value) {
100
+            return $this->dispatch(Builder::build($command, $args))->then(function($value) {
101 101
                 $len = count($value);
102 102
                 $ret = [];
103
-                for ($i=0; $i<$len; $i+=2) {
104
-                    $ret[$value[$i]] = $value[$i+1];
103
+                for ($i = 0; $i < $len; $i += 2) {
104
+                    $ret[$value[$i]] = $value[$i + 1];
105 105
                 }
106 106
                 return $ret;
107 107
             });
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
     public function zRevRangeByLex($key, $max, $min, array $options = [])
131 131
     {
132 132
         $command = Enum::ZREVRANGEBYLEX;
133
-        $args = [$key, $max,$min];
134
-        $args = array_merge($args,$options);
133
+        $args = [$key, $max, $min];
134
+        $args = array_merge($args, $options);
135 135
 
136 136
         return $this->dispatch(Builder::build($command, $args));
137 137
     }
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
         }
155 155
         $promise = $this->dispatch(Builder::build($command, $args));
156 156
 
157
-        return $withScores ? $promise->then(function ($value) {
157
+        return $withScores ? $promise->then(function($value) {
158 158
             $len = is_array($value) ? count($value) : 0;
159 159
             if ($len > 0) {
160 160
                 $ret = [];
161
-                for ($i=0; $i<$len; $i+=2) {
162
-                    $ret[$value[$i]] = $value[$i+1];
161
+                for ($i = 0; $i < $len; $i += 2) {
162
+                    $ret[$value[$i]] = $value[$i + 1];
163 163
                 }
164 164
 
165 165
                 return $ret;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     public function zRank($key, $member)
177 177
     {
178 178
         $command = Enum::ZRANK;
179
-        $args = [$key,$member];
179
+        $args = [$key, $member];
180 180
 
181 181
         return $this->dispatch(Builder::build($command, $args));
182 182
     }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     public function zRemRangeByRank($key, $start, $stop)
215 215
     {
216 216
         $command = Enum::ZREMRANGEBYRANK;
217
-        $args = [$key, $start,$stop];
217
+        $args = [$key, $start, $stop];
218 218
 
219 219
         return $this->dispatch(Builder::build($command, $args));
220 220
     }
@@ -245,13 +245,13 @@  discard block
 block discarded – undo
245 245
             $args[] = 'WITHSCORES';
246 246
             
247 247
             return $this->dispatch(Builder::build($command, $args))
248
-            ->then(function ($value) {
248
+            ->then(function($value) {
249 249
                 $len = is_array($value) ? count($value) : 0;
250 250
                 if ($len > 0) {
251 251
                     $ret = [];
252
-                    for ($i=0; $i<$len; $i+=2) {
252
+                    for ($i = 0; $i < $len; $i += 2) {
253 253
                         $member = $value[$i];
254
-                        $score = $value[$i+1];
254
+                        $score = $value[$i + 1];
255 255
                         $ret[$member] = $score;
256 256
                     }
257 257
 
@@ -283,12 +283,12 @@  discard block
 block discarded – undo
283 283
         }
284 284
         $promise = $this->dispatch(Builder::build($command, $args));
285 285
 
286
-        return $withScores ? $promise->then(function ($value) {
286
+        return $withScores ? $promise->then(function($value) {
287 287
             $len = is_array($value) ? count($value) : 0;
288 288
             if ($len > 0) {
289 289
                 $ret = [];
290
-                for ($i=0; $i<$len; $i+=2) {
291
-                    $ret[$value[$i]] = $value[$i+1];
290
+                for ($i = 0; $i < $len; $i += 2) {
291
+                    $ret[$value[$i]] = $value[$i + 1];
292 292
                 }
293 293
 
294 294
                 return $ret;
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
     public function zRevRank($key, $member)
306 306
     {
307 307
         $command = Enum::ZREVRANK;
308
-        $args = [$key,$member];
308
+        $args = [$key, $member];
309 309
 
310 310
         return $this->dispatch(Builder::build($command, $args));
311 311
     }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     public function zScore($key, $member)
318 318
     {
319 319
         $command = Enum::ZSCORE;
320
-        $args = [$key,$member];
320
+        $args = [$key, $member];
321 321
 
322 322
         return $this->dispatch(Builder::build($command, $args));
323 323
     }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     {
331 331
         // TODO: Implement zScan() method.
332 332
         $command = Enum::ZSCAN;
333
-        $args = [$key , $cursor];
333
+        $args = [$key, $cursor];
334 334
         $args = array_merge($args, $options);
335 335
 
336 336
         return $this->dispatch(Builder::build($command, $args));
Please login to merge, or discard this patch.
Braces   +26 added lines, -13 removed lines patch added patch discarded remove patch
@@ -95,12 +95,14 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $command = Enum::ZRANGE;
97 97
         $args = [$key, $star, $stop];
98
-        if ($withScores) {
98
+        if ($withScores)
99
+        {
99 100
             $args[] = 'WITHSCORES';
100 101
             return $this->dispatch(Builder::build($command, $args))->then(function ($value) {
101 102
                 $len = count($value);
102 103
                 $ret = [];
103
-                for ($i=0; $i<$len; $i+=2) {
104
+                for ($i=0; $i<$len; $i+=2)
105
+                {
104 106
                     $ret[$value[$i]] = $value[$i+1];
105 107
                 }
106 108
                 return $ret;
@@ -144,10 +146,12 @@  discard block
 block discarded – undo
144 146
     {
145 147
         $command = Enum::ZRANGEBYSCORE;
146 148
         $args = [$key, $min, $max];
147
-        if ($withScores === true) {
149
+        if ($withScores === true)
150
+        {
148 151
             $args[] = 'WITHSCORES';
149 152
         }
150
-        if ($offset != 0 || $count != 0) {
153
+        if ($offset != 0 || $count != 0)
154
+        {
151 155
             $args[] = 'LIMIT';
152 156
             $args[] = $offset;
153 157
             $args[] = $count;
@@ -156,9 +160,11 @@  discard block
 block discarded – undo
156 160
 
157 161
         return $withScores ? $promise->then(function ($value) {
158 162
             $len = is_array($value) ? count($value) : 0;
159
-            if ($len > 0) {
163
+            if ($len > 0)
164
+            {
160 165
                 $ret = [];
161
-                for ($i=0; $i<$len; $i+=2) {
166
+                for ($i=0; $i<$len; $i+=2)
167
+                {
162 168
                     $ret[$value[$i]] = $value[$i+1];
163 169
                 }
164 170
 
@@ -241,15 +247,18 @@  discard block
 block discarded – undo
241 247
         $command = Enum::ZREVRANGE;
242 248
         $args = [$key, $start, $stop];
243 249
 
244
-        if ($withScores === true) {
250
+        if ($withScores === true)
251
+        {
245 252
             $args[] = 'WITHSCORES';
246 253
             
247 254
             return $this->dispatch(Builder::build($command, $args))
248 255
             ->then(function ($value) {
249 256
                 $len = is_array($value) ? count($value) : 0;
250
-                if ($len > 0) {
257
+                if ($len > 0)
258
+                {
251 259
                     $ret = [];
252
-                    for ($i=0; $i<$len; $i+=2) {
260
+                    for ($i=0; $i<$len; $i+=2)
261
+                    {
253 262
                         $member = $value[$i];
254 263
                         $score = $value[$i+1];
255 264
                         $ret[$member] = $score;
@@ -273,10 +282,12 @@  discard block
 block discarded – undo
273 282
     {
274 283
         $command = Enum::ZREVRANGEBYSCORE;
275 284
         $args = [$key, $max, $min];
276
-        if ($withScores === true) {
285
+        if ($withScores === true)
286
+        {
277 287
             $args[] = 'WITHSCORES';
278 288
         }
279
-        if ($offset != 0 || $count != 0) {
289
+        if ($offset != 0 || $count != 0)
290
+        {
280 291
             $args[] = 'LIMIT';
281 292
             $args[] = $offset;
282 293
             $args[] = $count;
@@ -285,9 +296,11 @@  discard block
 block discarded – undo
285 296
 
286 297
         return $withScores ? $promise->then(function ($value) {
287 298
             $len = is_array($value) ? count($value) : 0;
288
-            if ($len > 0) {
299
+            if ($len > 0)
300
+            {
289 301
                 $ret = [];
290
-                for ($i=0; $i<$len; $i+=2) {
302
+                for ($i=0; $i<$len; $i+=2)
303
+                {
291 304
                     $ret[$value[$i]] = $value[$i+1];
292 305
                 }
293 306
 
Please login to merge, or discard this patch.