Passed
Push — master ( 42e5b7...88dffa )
by david
02:04 queued 19s
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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             "picture" => $picture // (optionnal) full url only
105 105
         );
106 106
 
107
-        $res = $client->request('POST', $this->getDir() . '/pub/sso/registerUser/pubkey/' . urlencode($this->getGcPublic()) . '/key/' . urlencode($this->generateSsoData($data)), ['http_errors' => false, 'timeout' => 5]);
107
+        $res = $client->request('POST', $this->getDir() . '/pub/sso/registerUser/pubkey/' . urlencode($this->getGcPublic()) . '/key/' . urlencode($this->generateSsoData($data)), [ 'http_errors' => false, 'timeout' => 5 ]);
108 108
 
109 109
         if ($res->getStatusCode() == "200") {
110 110
             return $res->getBody();
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             "gc_id" => $gc_id
129 129
         );
130 130
 
131
-        $res = $client->request('POST', $this->getDir() . '/pub/sso/loginUser/pubkey/' . urlencode($this->getGcPublic()). '/key/' . urlencode($this->generateSsoData($data)), ['http_errors' => false, 'timeout' => 5]);
131
+        $res = $client->request('POST', $this->getDir() . '/pub/sso/loginUser/pubkey/' . urlencode($this->getGcPublic()) . '/key/' . urlencode($this->generateSsoData($data)), [ 'http_errors' => false, 'timeout' => 5 ]);
132 132
 
133 133
         return $res->getBody();
134 134
     }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             "gc_id" => $gc_id
149 149
         );
150 150
 
151
-        $res = $client->request('GET', $this->getDir() . '/pub/sso/getUser/pubkey/' . urlencode($this->getGcPublic()). '/key/' . urlencode($this->generateSsoData($data)), ['http_errors' => false, 'timeout' => 5]);
151
+        $res = $client->request('GET', $this->getDir() . '/pub/sso/getUser/pubkey/' . urlencode($this->getGcPublic()) . '/key/' . urlencode($this->generateSsoData($data)), [ 'http_errors' => false, 'timeout' => 5 ]);
152 152
 
153 153
         return $res->getBody();
154 154
     }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             "picture" => $picture
185 185
         );
186 186
 
187
-        $res = $client->request('PUT', $this->getDir() . '/pub/sso/updateUser/pubkey/' . urlencode($this->getGcPublic()). '/key/' . urlencode($this->generateSsoData($data)), ['http_errors' => false, 'timeout' => 5]);
187
+        $res = $client->request('PUT', $this->getDir() . '/pub/sso/updateUser/pubkey/' . urlencode($this->getGcPublic()) . '/key/' . urlencode($this->generateSsoData($data)), [ 'http_errors' => false, 'timeout' => 5 ]);
188 188
 
189 189
         return $res->getBody();
190 190
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             "gc_id" => $gc_id
206 206
         );
207 207
 
208
-        $res = $client->request('DELETE', $this->getDir() . '/pub/sso/deleteProfileByGcId/pubkey/' . urlencode($this->getGcPublic()). '/key/' . urlencode($this->generateSsoData($data)), ['http_errors' => false, 'timeout' => 5]);
208
+        $res = $client->request('DELETE', $this->getDir() . '/pub/sso/deleteProfileByGcId/pubkey/' . urlencode($this->getGcPublic()) . '/key/' . urlencode($this->generateSsoData($data)), [ 'http_errors' => false, 'timeout' => 5 ]);
209 209
 
210 210
         return $res->getBody();
211 211
     }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      * @param string $uid (unique id of the thread) optionnal
220 220
      * @return object json {count: numberOfComments }
221 221
      */
222
-    public function countComments($url, $uid='') {
222
+    public function countComments($url, $uid = '') {
223 223
         $client = new Client();
224 224
 
225 225
         $data = array(
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             "uid" => $uid
228 228
         );
229 229
 
230
-        $res = $client->request('GET', $this->getDir() . '/pub/sso/numberOfComments/pubkey/' . urlencode($this->getGcPublic()). '/key/' . urlencode($this->generateSsoData($data)), ['http_errors' => false, 'timeout' => 5]);
230
+        $res = $client->request('GET', $this->getDir() . '/pub/sso/numberOfComments/pubkey/' . urlencode($this->getGcPublic()) . '/key/' . urlencode($this->generateSsoData($data)), [ 'http_errors' => false, 'timeout' => 5 ]);
231 231
 
232 232
         return $res->getBody();
233 233
     }
Please login to merge, or discard this patch.