Passed
Pull Request — master (#18)
by Stefano
02:05
created
src/BEditaClient.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)) {
@@ -608,16 +608,16 @@  discard block
 block discarded – undo
608 608
     {
609 609
         if (strpos($path, $this->apiBaseUrl) !== 0) {
610 610
             if (substr($path, 0, 1) !== '/') {
611
-                $path = '/' . $path;
611
+                $path = '/'.$path;
612 612
             }
613
-            $path = $this->apiBaseUrl . $path;
613
+            $path = $this->apiBaseUrl.$path;
614 614
         }
615 615
         $uri = new Uri($path);
616 616
 
617 617
         // if path contains query strings, remove them from path and add them to query filter
618 618
         parse_str($uri->getQuery(), $uriQuery);
619 619
         if ($query) {
620
-            $query = array_merge((array)$uriQuery, (array)$query);
620
+            $query = array_merge((array) $uriQuery, (array) $query);
621 621
             $uri = $uri->withQuery(http_build_query($query));
622 622
         }
623 623
 
Please login to merge, or discard this patch.
src/LogTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     protected function requestBodyCleanup(RequestInterface $request) : string
78 78
     {
79 79
         $body = $request->getBody();
80
-        if (empty((string)$body)) {
80
+        if (empty((string) $body)) {
81 81
             return '(empty)';
82 82
         }
83 83
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     protected function responseBodyCleanup(ResponseInterface $response) : string
144 144
     {
145 145
         $body = $response->getBody();
146
-        if (empty((string)$body)) {
146
+        if (empty((string) $body)) {
147 147
             return '(empty)';
148 148
         }
149 149
 
Please login to merge, or discard this patch.