@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | $args = [$key, $star, $stop]; |
104 | 104 | if ($withScores) { |
105 | 105 | $args[] = 'WITHSCORES'; |
106 | - return $this->dispatch(Builder::build($command, $args))->then(function ($value) { |
|
106 | + return $this->dispatch(Builder::build($command, $args))->then(function($value) { |
|
107 | 107 | $len = count($value); |
108 | 108 | $ret = []; |
109 | - for ($i=0; $i<$len; $i+=2) { |
|
110 | - $ret[$value[$i]] = $value[$i+1]; |
|
109 | + for ($i = 0; $i < $len; $i += 2) { |
|
110 | + $ret[$value[$i]] = $value[$i + 1]; |
|
111 | 111 | } |
112 | 112 | return $ret; |
113 | 113 | }); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | { |
125 | 125 | $command = Enum::ZRANGEBYLEX; |
126 | 126 | $args = [$key, $min, $max]; |
127 | - $args = array_merge($args,$options); |
|
127 | + $args = array_merge($args, $options); |
|
128 | 128 | |
129 | 129 | return $this->dispatch(Builder::build($command, $args)); |
130 | 130 | } |
@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | public function zRevRangeByLex($key, $max, $min, array $options = []) |
137 | 137 | { |
138 | 138 | $command = Enum::ZREVRANGEBYLEX; |
139 | - $args = [$key, $max,$min]; |
|
140 | - $args = array_merge($args,$options); |
|
139 | + $args = [$key, $max, $min]; |
|
140 | + $args = array_merge($args, $options); |
|
141 | 141 | |
142 | 142 | return $this->dispatch(Builder::build($command, $args)); |
143 | 143 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | public function zRangeByScore($key, $min, $max, array $options = []) |
150 | 150 | { |
151 | 151 | $command = Enum::ZRANGEBYSCORE; |
152 | - $args = [$key, $min,$max]; |
|
152 | + $args = [$key, $min, $max]; |
|
153 | 153 | $args = array_merge($args, $options); |
154 | 154 | |
155 | 155 | return $this->dispatch(Builder::build($command, $args)); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function zRank($key, $member) |
163 | 163 | { |
164 | 164 | $command = Enum::ZRANK; |
165 | - $args = [$key,$member]; |
|
165 | + $args = [$key, $member]; |
|
166 | 166 | |
167 | 167 | return $this->dispatch(Builder::build($command, $args)); |
168 | 168 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | public function zRemRangeByRank($key, $start, $stop) |
201 | 201 | { |
202 | 202 | $command = Enum::ZREMRANGEBYRANK; |
203 | - $args = [$key, $start,$stop]; |
|
203 | + $args = [$key, $start, $stop]; |
|
204 | 204 | |
205 | 205 | return $this->dispatch(Builder::build($command, $args)); |
206 | 206 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | public function zRevRangeByScore($key, $max, $min, array $options = []) |
239 | 239 | { |
240 | 240 | $command = Enum::ZREVRANGEBYSCORE; |
241 | - $args = [$key,$max,$min]; |
|
241 | + $args = [$key, $max, $min]; |
|
242 | 242 | $args = array_merge($args, $options); |
243 | 243 | |
244 | 244 | return $this->dispatch(Builder::build($command, $args)); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | public function zRevRank($key, $member) |
252 | 252 | { |
253 | 253 | $command = Enum::ZREVRANK; |
254 | - $args = [$key,$member]; |
|
254 | + $args = [$key, $member]; |
|
255 | 255 | |
256 | 256 | return $this->dispatch(Builder::build($command, $args)); |
257 | 257 | } |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | public function zScore($key, $member) |
264 | 264 | { |
265 | 265 | $command = Enum::ZSCORE; |
266 | - $args = [$key,$member]; |
|
266 | + $args = [$key, $member]; |
|
267 | 267 | |
268 | 268 | return $this->dispatch(Builder::build($command, $args)); |
269 | 269 | } |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | { |
277 | 277 | // TODO: Implement zScan() method. |
278 | 278 | $command = Enum::ZSCAN; |
279 | - $args = [$key , $cursor]; |
|
279 | + $args = [$key, $cursor]; |
|
280 | 280 | $args = array_merge($args, $options); |
281 | 281 | |
282 | 282 | return $this->dispatch(Builder::build($command, $args)); |
@@ -21,7 +21,7 @@ discard block |
||
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 |
||
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 |