Completed
Push — master ( 9e30d1...c7ffd5 )
by Gabriel
02:32
created
src/RequestHandler.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,9 @@
 block discarded – undo
62 62
     {
63 63
         $headers['Content-Type'] = 'application/json';
64 64
         $body = null;
65
-        if ($params) $body = \GuzzleHttp\json_encode($params);
65
+        if ($params) {
66
+            $body = \GuzzleHttp\json_encode($params);
67
+        }
66 68
         $request = new GuzzleRequest('POST', $endpoint, $headers, $body);
67 69
 
68 70
         try {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
     private function handleBadResponse(ResponseInterface $response)
54 54
     {
55
-        $body = (string) $response->getBody();
55
+        $body = (string)$response->getBody();
56 56
         $json = \GuzzleHttp\json_decode($body, true);
57 57
         ErrorHandler::error($json);
58 58
     }
Please login to merge, or discard this patch.
src/ErrorHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public static function error(array $error)
16 16
     {
17
-        switch($error['error']) {
17
+        switch ($error['error']) {
18 18
             case 'invalid_request': throw new InvalidRequestException($error['message']);
19 19
             case 'account_banned': throw new AccountBannedException($error['message']);
20 20
             case 'account_deleted': throw new AccountDeletedException($error['message']);
Please login to merge, or discard this patch.