Passed
Push — master ( 6b2c4c...9e30d1 )
by Gabriel
02:30
created
src/RequestHandler.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $this->accessToken = $accessToken;
20 20
         $this->apiUrl = $apiUrl;
21
-        $this->client = new Client(['base_uri' => $this->apiUrl . '/']);
21
+        $this->client = new Client(['base_uri' => $this->apiUrl.'/']);
22 22
     }
23 23
 
24 24
     public function getAccessToken(): string
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
     public function setApiUrl(string $apiUrl)
40 40
     {
41 41
         $this->apiUrl = $apiUrl;
42
-        $this->client = new Client(['base_uri' => $apiUrl . '/']);
42
+        $this->client = new Client(['base_uri' => $apiUrl.'/']);
43 43
     }
44 44
 
45 45
     private function handleBadResponse(ResponseInterface $response)
46 46
     {
47
-        $body = (string) $response->getBody();
47
+        $body = (string)$response->getBody();
48 48
         $json = \GuzzleHttp\json_decode($body, true);
49 49
         ErrorHandler::error($json);
50 50
     }
Please login to merge, or discard this patch.
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.
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.