Completed
Pull Request — master (#3)
by
unknown
02:31
created
src/Redis/Driver/RequestInterface.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,4 +5,5 @@
 block discarded – undo
5 5
 use Clue\Redis\Protocol\Model\ModelInterface as ClueModelInterface;
6 6
 
7 7
 interface RequestInterface extends ClueModelInterface
8
-{}
8
+{
9
+}
Please login to merge, or discard this patch.
src/Redis/Redis.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,9 +128,11 @@  discard block
 block discarded – undo
128 128
             $stream = $this->createClient($this->endpoint);
129 129
         }
130 130
         catch (Error $ex)
131
-        {}
131
+        {
132
+}
132 133
         catch (Exception $ex)
133
-        {}
134
+        {
135
+}
134 136
 
135 137
         if ($ex !== null)
136 138
         {
@@ -320,9 +322,11 @@  discard block
 block discarded – undo
320 322
             return new Socket($endpoint, $this->loop);
321 323
         }
322 324
         catch (Error $ex)
323
-        {}
325
+        {
326
+}
324 327
         catch (Exception $ex)
325
-        {}
328
+        {
329
+}
326 330
 
327 331
         throw new ExecutionException('Redis connection socket could not be created!', 0, $ex);
328 332
     }
Please login to merge, or discard this patch.
src/Redis/Command/Compose/ApiSetHashTrait.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,10 +49,12 @@  discard block
 block discarded – undo
49 49
         $args = [$key];
50 50
 
51 51
         return $this->dispatch(Builder::build($command, $args))->then(function ($value) {
52
-            if (!empty($value)) {
52
+            if (!empty($value))
53
+            {
53 54
                 $tmp = [];
54 55
                 $size = count($value);
55
-                for ($i=0; $i<$size; $i+=2) {
56
+                for ($i=0; $i<$size; $i+=2)
57
+                {
56 58
                     $field = $value[$i];
57 59
                     $val = $value[$i+1];
58 60
                     $tmp[$field] = $val;
@@ -133,8 +135,10 @@  discard block
 block discarded – undo
133 135
     {
134 136
         $command = Enum::HMSET;
135 137
         $args = [$key];
136
-        if (!empty($fvMap)) {
137
-            foreach ($fvMap as $field => $value) {
138
+        if (!empty($fvMap))
139
+        {
140
+            foreach ($fvMap as $field => $value)
141
+            {
138 142
                 $tmp[] = $field;
139 143
                 $tmp[] = $value;
140 144
             }
Please login to merge, or discard this patch.
src/Redis/Command/Compose/ApiCoreTrait.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,18 +104,22 @@
 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(PHP_EOL, $value);
109 110
                 $handled = [];
110 111
                 $lastKey = '';
111
-                foreach ($ret as $_ => $v) {
112
-                    if (($pos = strpos($v, '#')) !== false) {
112
+                foreach ($ret as $_ => $v)
113
+                {
114
+                    if (($pos = strpos($v, '#')) !== false)
115
+                    {
113 116
                         $lastKey = strtolower(substr($v,$pos+2));
114 117
                         $handled[$lastKey] = [];
115 118
                         continue;
116 119
                     }
117 120
                     $statMap = explode(':', $v);
118
-                    if ($statMap[0]) {
121
+                    if ($statMap[0])
122
+                    {
119 123
                         list($name, $stat) = explode(':', $v);
120 124
                         $handled[$lastKey][$name] = $stat;
121 125
                     }
Please login to merge, or discard this patch.
src/Redis/Command/Compose/ApiKeyValTrait.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@
 block discarded – undo
45 45
     public function bitField($key, $subCommand = null, ...$param)
46 46
     {
47 47
         $command = Enum::BITFIELD;
48
-        switch ($subCommand = strtoupper($subCommand)) {
48
+        switch ($subCommand = strtoupper($subCommand))
49
+        {
49 50
             case 'GET' : {
50 51
                 list ($type, $offset) = $param;
51 52
                 $args = [$subCommand, $type, $offset];
Please login to merge, or discard this patch.
src/Redis/Command/Compose/ApiListTrait.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
         $args = $keys;
27 27
         $promise = $this->dispatch(Builder::build($command, $args));
28 28
         $promise = $promise->then(function ($value) {
29
-            if (is_array($value)) {
29
+            if (is_array($value))
30
+            {
30 31
                 list($k,$v) = $value;
31 32
 
32 33
                 return [
@@ -53,7 +54,8 @@  discard block
 block discarded – undo
53 54
         $args = $keys;
54 55
         $promise = $this->dispatch(Builder::build($command, $args));
55 56
         $promise = $promise->then(function ($value) {
56
-            if (is_array($value)) {
57
+            if (is_array($value))
58
+            {
57 59
                 list($k,$v) = $value;
58 60
 
59 61
                 return [
Please login to merge, or discard this patch.
src/Redis/Command/Compose/ApiSetSortedTrait.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,8 +22,10 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $command = Enum::ZADD;
24 24
         $args = array_merge([$key], $options);
25
-        if (!empty($scoreMembers)) {
26
-            foreach ($scoreMembers as $score => $member) {
25
+        if (!empty($scoreMembers))
26
+        {
27
+            foreach ($scoreMembers as $score => $member)
28
+            {
27 29
                 $args[] = (float) $score;
28 30
                 $args[] = $member;
29 31
             }
@@ -101,12 +103,14 @@  discard block
 block discarded – undo
101 103
     {
102 104
         $command = Enum::ZRANGE;
103 105
         $args = [$key, $star, $stop];
104
-        if ($withScores) {
106
+        if ($withScores)
107
+        {
105 108
             $args[] = 'WITHSCORES';
106 109
             return $this->dispatch(Builder::build($command, $args))->then(function ($value) {
107 110
                 $len = count($value);
108 111
                 $ret = [];
109
-                for ($i=0; $i<$len; $i+=2) {
112
+                for ($i=0; $i<$len; $i+=2)
113
+                {
110 114
                     $ret[$value[$i]] = $value[$i+1];
111 115
                 }
112 116
                 return $ret;
Please login to merge, or discard this patch.