Passed
Branch master (ed32b6)
by Vee
02:32
created
Category
src/Client.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,9 @@  discard block
 block discarded – undo
84 84
     public function send()
85 85
     {
86 86
         $data = $this->sendData();
87
-        if ($data === null) return;
87
+        if ($data === null) {
88
+            return;
89
+        }
88 90
         if (isset($data->error->code) && $data->error->code === Response::PARSE_ERROR) {
89 91
             return;
90 92
         }
@@ -93,9 +95,13 @@  discard block
 block discarded – undo
93 95
         }
94 96
 
95 97
         foreach ($data as $datum) {
96
-            if (!is_object($datum) || !property_exists($datum, 'id')) continue;
98
+            if (!is_object($datum) || !property_exists($datum, 'id')) {
99
+                continue;
100
+            }
97 101
             $response = array_key_exists($datum->id, $this->responses) ? $this->responses[$datum->id] : null;
98
-            if (!$response) continue;
102
+            if (!$response) {
103
+                continue;
104
+            }
99 105
             $response->resetError();
100 106
             $response->setProperties($datum);
101 107
         }
Please login to merge, or discard this patch.
src/Server.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,9 @@  discard block
 block discarded – undo
63 63
             // Check if ID already exists
64 64
             $ids = [];
65 65
             foreach ($responses as $response) {
66
-                if ($response->id === null) continue;
66
+                if ($response->id === null) {
67
+                    continue;
68
+                }
67 69
                 if (in_array($response->id, $ids, true)) {
68 70
                     throw new Exception(Response::DUPLICATED_ID);
69 71
                 }
@@ -74,7 +76,9 @@  discard block
 block discarded – undo
74 76
             return (string)$exception;
75 77
         }
76 78
 
77
-        if (empty($responses)) return '';
79
+        if (empty($responses)) {
80
+            return '';
81
+        }
78 82
         return json_encode($multiple ? $responses : current($responses));
79 83
     }
80 84
 
Please login to merge, or discard this patch.