Completed
Pull Request — master (#2)
by
unknown
03:39
created
src/Redis/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $this->host = $parts['host'];
55 55
         $this->port = $parts['port'];
56 56
         $this->auth = $auth;
57
-        $this->db =  $parts['db'];
57
+        $this->db = $parts['db'];
58 58
     }
59 59
 
60 60
     public function getHost()
Please login to merge, or discard this patch.
src/Redis/Redis.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
         {
72 72
             $payload = $this->driver->commands($command);
73 73
 
74
-            $this->dispatcher->on('request', function () use ($payload) {
74
+            $this->dispatcher->on('request', function() use ($payload) {
75 75
                 $this->dispatcher->handleRequest($payload);
76 76
             });
77 77
 
Please login to merge, or discard this patch.
src/Redis/Dispatcher.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
         $this->closed = false;
63 63
         $this->protocol = new Driver();
64 64
         $this->on('connect', [$this, 'handleConnect']);
65
-        $this->on('response',[$this, 'handleResponse']);
66
-        $this->on('disconnect',[$this, 'handleDisconnect']);
65
+        $this->on('response', [$this, 'handleResponse']);
66
+        $this->on('disconnect', [$this, 'handleDisconnect']);
67 67
         $this->on('close', [$this, 'handleClose']);
68 68
     }
69 69
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function isEnding()
122 122
     {
123
-        return $this->ending? true: false;
123
+        return $this->ending ? true : false;
124 124
     }
125 125
 
126 126
     /**
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     {
228 228
         $this->ending = true;
229 229
         // reject all remaining requests in the queue
230
-        while($this->reqs) {
230
+        while ($this->reqs) {
231 231
             $req = array_shift($this->reqs);
232 232
             /* @var $req Deferred */
233 233
             $req->reject(new RuntimeException('Connection closing'));
Please login to merge, or discard this patch.
src/Redis/Command/Compose/ApiSetSortedTrait.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.