@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $this->accessToken = $accessToken; |
| 18 | 18 | $this->apiUrl = $apiUrl; |
| 19 | - $this->client = new Client(['base_uri' => $this->apiUrl . '/']); |
|
| 19 | + $this->client = new Client(['base_uri' => $this->apiUrl.'/']); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | public function getAccessToken(): string |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | public function setApiUrl(string $apiUrl) |
| 38 | 38 | { |
| 39 | 39 | $this->apiUrl = $apiUrl; |
| 40 | - $this->client = new Client(['base_uri' => $apiUrl . '/']); |
|
| 40 | + $this->client = new Client(['base_uri' => $apiUrl.'/']); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | private function handleException(ResponseInterface $response) |
@@ -54,7 +54,9 @@ |
||
| 54 | 54 | { |
| 55 | 55 | $headers['Content-Type'] = 'application/json'; |
| 56 | 56 | $body = null; |
| 57 | - if ($params) $body = \GuzzleHttp\json_encode($params); |
|
| 57 | + if ($params) { |
|
| 58 | + $body = \GuzzleHttp\json_encode($params); |
|
| 59 | + } |
|
| 58 | 60 | $request = new GuzzleRequest('POST', $endpoint, $headers, $body); |
| 59 | 61 | $response = $this->client->send($request); |
| 60 | 62 | |