@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | if (empty($this->response)) { |
192 | 192 | return null; |
193 | 193 | } |
194 | - $responseBody = json_decode((string)$this->response->getBody(), true); |
|
194 | + $responseBody = json_decode((string) $this->response->getBody(), true); |
|
195 | 195 | if (!is_array($responseBody)) { |
196 | 196 | return null; |
197 | 197 | } |
@@ -391,14 +391,14 @@ discard block |
||
391 | 391 | { |
392 | 392 | $response = $this->post(sprintf('/%s', $type), json_encode($body)); |
393 | 393 | if (empty($response)) { |
394 | - throw new BEditaClientException('Invalid response from POST ' . sprintf('/%s', $type)); |
|
394 | + throw new BEditaClientException('Invalid response from POST '.sprintf('/%s', $type)); |
|
395 | 395 | } |
396 | 396 | $id = $response['data']['id']; |
397 | 397 | $data = compact('id', 'type'); |
398 | 398 | $body = compact('data'); |
399 | 399 | $response = $this->patch(sprintf('/streams/%s/relationships/object', $streamId), json_encode($body)); |
400 | 400 | if (empty($response)) { |
401 | - throw new BEditaClientException('Invalid response from PATCH ' . sprintf('/streams/%s/relationships/object', $id)); |
|
401 | + throw new BEditaClientException('Invalid response from PATCH '.sprintf('/streams/%s/relationships/object', $id)); |
|
402 | 402 | } |
403 | 403 | |
404 | 404 | return $this->getObject($data['id'], $data['type']); |
@@ -525,11 +525,11 @@ discard block |
||
525 | 525 | protected function sendRequest(string $method, string $path, ?array $query = null, ?array $headers = null, $body = null) : ResponseInterface |
526 | 526 | { |
527 | 527 | $uri = new Uri($this->apiBaseUrl); |
528 | - $uri = $uri->withPath($uri->getPath() . '/' . $path); |
|
528 | + $uri = $uri->withPath($uri->getPath().'/'.$path); |
|
529 | 529 | if ($query) { |
530 | - $uri = $uri->withQuery(http_build_query((array)$query)); |
|
530 | + $uri = $uri->withQuery(http_build_query((array) $query)); |
|
531 | 531 | } |
532 | - $headers = array_merge($this->defaultHeaders, (array)$headers); |
|
532 | + $headers = array_merge($this->defaultHeaders, (array) $headers); |
|
533 | 533 | |
534 | 534 | // set default `Content-Type` if not set and $body not empty |
535 | 535 | if (!empty($body)) { |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | $statusCode = $this->getStatusCode(); |
544 | 544 | $response = $this->getResponseBody(); |
545 | 545 | |
546 | - $code = (string)$statusCode; |
|
546 | + $code = (string) $statusCode; |
|
547 | 547 | $reason = $this->getStatusMessage(); |
548 | 548 | if (!empty($response['error']['code'])) { |
549 | 549 | $code = $response['error']['code']; |