Passed
Push — master ( 268fa0...97db2c )
by david
03:11
created
src/Graphcomment.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -260,8 +260,9 @@
 block discarded – undo
260 260
         $blocksize = 64;
261 261
         $hashfunc = 'sha1';
262 262
 
263
-        if (strlen($key) > $blocksize)
264
-            $key = pack('H*', $hashfunc($key));
263
+        if (strlen($key) > $blocksize) {
264
+                    $key = pack('H*', $hashfunc($key));
265
+        }
265 266
 
266 267
         $key = str_pad($key, $blocksize, chr(0x00));
267 268
         $ipad = str_repeat(chr(0x36), $blocksize);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             "picture" => $picture // (optionnal) full url only
107 107
         );
108 108
 
109
-        $res = $client->request('POST', $this->getDir() . '/pub/sso/registerUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]);
109
+        $res = $client->request('POST', $this->getDir() . '/pub/sso/registerUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]);
110 110
 
111 111
         if ($res->getStatusCode() == "200") {
112 112
             return $res->getBody();
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             "gc_id" => $gc_id
132 132
         );
133 133
 
134
-        $res = $client->request('POST', $this->getDir() . '/pub/sso/loginUser/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]);
134
+        $res = $client->request('POST', $this->getDir() . '/pub/sso/loginUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]);
135 135
 
136 136
         return $res->getBody();
137 137
     }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             "gc_id" => $gc_id
153 153
         );
154 154
 
155
-        $res = $client->request('GET', $this->getDir() . '/pub/sso/getUser/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]);
155
+        $res = $client->request('GET', $this->getDir() . '/pub/sso/getUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]);
156 156
 
157 157
         return $res->getBody();
158 158
     }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             "picture" => $picture
190 190
         );
191 191
 
192
-        $res = $client->request('PUT', $this->getDir() . '/pub/sso/updateUser/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]);
192
+        $res = $client->request('PUT', $this->getDir() . '/pub/sso/updateUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]);
193 193
 
194 194
         return $res->getBody();
195 195
     }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         $data = array(
211 211
             "gc_id" => $gc_id);
212 212
 
213
-        $res = $client->request('DELETE', $this->getDir() . '/pub/sso/deleteProfileByGcId/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]);
213
+        $res = $client->request('DELETE', $this->getDir() . '/pub/sso/deleteProfileByGcId/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]);
214 214
 
215 215
         return $res->getBody();
216 216
     }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      * @return object json {count: numberOfComments }
225 225
      * @throws GuzzleException
226 226
      */
227
-    public function countComments($url, $uid='') {
227
+    public function countComments($url, $uid = '') {
228 228
         $client = new Client();
229 229
 
230 230
         $data = array(
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
             "uid" => $uid
233 233
         );
234 234
 
235
-        $res = $client->request('GET', $this->getDir() . '/pub/sso/numberOfComments/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]);
235
+        $res = $client->request('GET', $this->getDir() . '/pub/sso/numberOfComments/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]);
236 236
 
237 237
         return $res->getBody();
238 238
     }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      * @return object json-ld
246 246
      * @throws GuzzleException
247 247
      */
248
-    public function getThreadJsonLdFormat($url, $uid='') {
248
+    public function getThreadJsonLdFormat($url, $uid = '') {
249 249
         $client = new Client();
250 250
 
251 251
         $data = array(
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
             "uid" => $uid
254 254
         );
255 255
 
256
-        $res = $client->request('GET', $this->getDir() . '/pub/sso/thread-jsonld/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]);
256
+        $res = $client->request('GET', $this->getDir() . '/pub/sso/thread-jsonld/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]);
257 257
 
258 258
         return $res->getBody();
259 259
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     public function exportComments() {
268 268
         $client = new Client();
269 269
 
270
-        $res = $client->request('GET', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData('key'), ['http_errors' => false, 'timeout' => 5]);
270
+        $res = $client->request('GET', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData('key'), [ 'http_errors' => false, 'timeout' => 5 ]);
271 271
 
272 272
         return $res->getBody();
273 273
     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
         $data = $commentIds;
287 287
 
288
-        $res = $client->request('POST', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]);
288
+        $res = $client->request('POST', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]);
289 289
 
290 290
         return $res->getBody();
291 291
     }
Please login to merge, or discard this patch.