@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | if (empty($response)) { |
194 | 194 | return null; |
195 | 195 | } |
196 | - $responseBody = json_decode((string)$response->getBody(), true); |
|
196 | + $responseBody = json_decode((string) $response->getBody(), true); |
|
197 | 197 | if (!is_array($responseBody)) { |
198 | 198 | return null; |
199 | 199 | } |
@@ -432,14 +432,14 @@ discard block |
||
432 | 432 | { |
433 | 433 | $response = $this->post(sprintf('/%s', $type), json_encode($body)); |
434 | 434 | if (empty($response)) { |
435 | - throw new BEditaClientException('Invalid response from POST ' . sprintf('/%s', $type)); |
|
435 | + throw new BEditaClientException('Invalid response from POST '.sprintf('/%s', $type)); |
|
436 | 436 | } |
437 | 437 | $id = $response['data']['id']; |
438 | 438 | $data = compact('id', 'type'); |
439 | 439 | $body = compact('data'); |
440 | 440 | $response = $this->patch(sprintf('/streams/%s/relationships/object', $streamId), json_encode($body)); |
441 | 441 | if (empty($response)) { |
442 | - throw new BEditaClientException('Invalid response from PATCH ' . sprintf('/streams/%s/relationships/object', $id)); |
|
442 | + throw new BEditaClientException('Invalid response from PATCH '.sprintf('/streams/%s/relationships/object', $id)); |
|
443 | 443 | } |
444 | 444 | |
445 | 445 | return $this->getObject($data['id'], $data['type']); |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | protected function sendRequest(string $method, string $path, ?array $query = null, ?array $headers = null, $body = null): ResponseInterface |
609 | 609 | { |
610 | 610 | $uri = $this->requestUri($path, $query); |
611 | - $headers = array_merge($this->defaultHeaders, (array)$headers); |
|
611 | + $headers = array_merge($this->defaultHeaders, (array) $headers); |
|
612 | 612 | |
613 | 613 | // set default `Content-Type` if not set and $body not empty |
614 | 614 | if (!empty($body)) { |
@@ -645,16 +645,16 @@ discard block |
||
645 | 645 | { |
646 | 646 | if (strpos($path, 'https://') !== 0 && strpos($path, 'http://') !== 0) { |
647 | 647 | if (substr($path, 0, 1) !== '/') { |
648 | - $path = '/' . $path; |
|
648 | + $path = '/'.$path; |
|
649 | 649 | } |
650 | - $path = $this->apiBaseUrl . $path; |
|
650 | + $path = $this->apiBaseUrl.$path; |
|
651 | 651 | } |
652 | 652 | $uri = new Uri($path); |
653 | 653 | |
654 | 654 | // if path contains query strings, remove them from path and add them to query filter |
655 | 655 | parse_str($uri->getQuery(), $uriQuery); |
656 | 656 | if ($query) { |
657 | - $query = array_merge((array)$uriQuery, (array)$query); |
|
657 | + $query = array_merge((array) $uriQuery, (array) $query); |
|
658 | 658 | $uri = $uri->withQuery(http_build_query($query)); |
659 | 659 | } |
660 | 660 |