@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | if (empty($response)) { |
193 | 193 | return null; |
194 | 194 | } |
195 | - $responseBody = json_decode((string)$response->getBody(), true); |
|
195 | + $responseBody = json_decode((string) $response->getBody(), true); |
|
196 | 196 | if (!is_array($responseBody)) { |
197 | 197 | return null; |
198 | 198 | } |
@@ -416,14 +416,14 @@ discard block |
||
416 | 416 | { |
417 | 417 | $response = $this->post(sprintf('/%s', $type), json_encode($body)); |
418 | 418 | if (empty($response)) { |
419 | - throw new BEditaClientException('Invalid response from POST ' . sprintf('/%s', $type)); |
|
419 | + throw new BEditaClientException('Invalid response from POST '.sprintf('/%s', $type)); |
|
420 | 420 | } |
421 | 421 | $id = $response['data']['id']; |
422 | 422 | $data = compact('id', 'type'); |
423 | 423 | $body = compact('data'); |
424 | 424 | $response = $this->patch(sprintf('/streams/%s/relationships/object', $streamId), json_encode($body)); |
425 | 425 | if (empty($response)) { |
426 | - throw new BEditaClientException('Invalid response from PATCH ' . sprintf('/streams/%s/relationships/object', $id)); |
|
426 | + throw new BEditaClientException('Invalid response from PATCH '.sprintf('/streams/%s/relationships/object', $id)); |
|
427 | 427 | } |
428 | 428 | |
429 | 429 | return $this->getObject($data['id'], $data['type']); |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | protected function sendRequest(string $method, string $path, ?array $query = null, ?array $headers = null, $body = null) : ResponseInterface |
578 | 578 | { |
579 | 579 | $uri = $this->requestUri($path, $query); |
580 | - $headers = array_merge($this->defaultHeaders, (array)$headers); |
|
580 | + $headers = array_merge($this->defaultHeaders, (array) $headers); |
|
581 | 581 | |
582 | 582 | // set default `Content-Type` if not set and $body not empty |
583 | 583 | if (!empty($body)) { |
@@ -613,15 +613,15 @@ discard block |
||
613 | 613 | $uri = new Uri($this->apiBaseUrl); |
614 | 614 | // add starting '/' if missing |
615 | 615 | if (substr($path, 0, 1) !== '/') { |
616 | - $path = '/' . $path; |
|
616 | + $path = '/'.$path; |
|
617 | 617 | } |
618 | - $uri = $uri->withPath($uri->getPath() . $path); |
|
618 | + $uri = $uri->withPath($uri->getPath().$path); |
|
619 | 619 | } |
620 | 620 | |
621 | 621 | // if path contains query strings, remove them from path and add them to query filter |
622 | 622 | parse_str($uri->getQuery(), $uriQuery); |
623 | 623 | if ($query) { |
624 | - $query = array_merge((array)$uriQuery, (array)$query); |
|
624 | + $query = array_merge((array) $uriQuery, (array) $query); |
|
625 | 625 | $uri = $uri->withQuery(http_build_query($query)); |
626 | 626 | } |
627 | 627 |