Completed
Push — master ( c197d4...32dbd8 )
by Stefano
21s queued 13s
created
src/Controller/Component/ApiFormatterComponent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function embedIncluded(array $response): array
27 27
     {
28
-        $data = (array)Hash::get($response, 'data');
28
+        $data = (array) Hash::get($response, 'data');
29 29
         if (empty($data)) {
30 30
             return $response;
31 31
         }
32 32
 
33
-        $included = (array)Hash::get($response, 'included');
33
+        $included = (array) Hash::get($response, 'included');
34 34
         if (empty($included)) {
35 35
             return $response;
36 36
         }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                 continue;
67 67
             }
68 68
 
69
-            $relation['data'] = $this->extractFromIncluded($included, (array)$relation['data']);
69
+            $relation['data'] = $this->extractFromIncluded($included, (array) $relation['data']);
70 70
         }
71 71
         unset($relation);
72 72
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function extractFromIncluded(Collection $included, array $relationshipData): array
85 85
     {
86 86
         foreach ($relationshipData as &$data) {
87
-            $data = (array)$included->firstMatch([
87
+            $data = (array) $included->firstMatch([
88 88
                 'type' => $data['type'],
89 89
                 'id' => $data['id'],
90 90
             ]);
Please login to merge, or discard this patch.