Passed
Push — master ( 97600c...89943d )
by Jasper
10:45
created
src/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function toJsonApiArray(): array
15 15
     {
16 16
         return array_map(
17
-            function ($value) {
17
+            function($value) {
18 18
                 return $value instanceof DataInterface ? $value->toJsonApiArray() : $value;
19 19
             },
20 20
             $this->items
Please login to merge, or discard this patch.
src/DocumentFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
     {
35 35
         return Collection::wrap($data)
36 36
             ->flatMap(
37
-                function (ItemInterface $item) {
37
+                function(ItemInterface $item) {
38 38
                     return $this->getIncludedFromItem($item);
39 39
                 }
40 40
             )
41 41
             ->unique(
42
-                static function (ItemInterface $item) {
42
+                static function(ItemInterface $item) {
43 43
                     return sprintf('%s:%s', $item->getType(), $item->getId());
44 44
                 }
45 45
             )
@@ -55,24 +55,24 @@  discard block
 block discarded – undo
55 55
     {
56 56
         return Collection::make($item->getRelations())
57 57
             ->reject(
58
-                static function ($relationship) {
58
+                static function($relationship) {
59 59
                     /* @var \Swis\JsonApi\Client\Interfaces\OneRelationInterface|\Swis\JsonApi\Client\Interfaces\ManyRelationInterface $relationship */
60 60
                     return $relationship->shouldOmitIncluded() || !$relationship->hasIncluded();
61 61
                 }
62 62
             )
63 63
             ->flatMap(
64
-                static function ($relationship) {
64
+                static function($relationship) {
65 65
                     /* @var \Swis\JsonApi\Client\Interfaces\OneRelationInterface|\Swis\JsonApi\Client\Interfaces\ManyRelationInterface $relationship */
66 66
                     return Collection::wrap($relationship->getIncluded());
67 67
                 }
68 68
             )
69 69
             ->flatMap(
70
-                function (ItemInterface $item) {
70
+                function(ItemInterface $item) {
71 71
                     return Collection::wrap($item)->merge($this->getIncludedFromItem($item));
72 72
                 }
73 73
             )
74 74
             ->filter(
75
-                function (ItemInterface $item) {
75
+                function(ItemInterface $item) {
76 76
                     return $this->itemCanBeIncluded($item);
77 77
                 }
78 78
             );
Please login to merge, or discard this patch.
src/Parsers/ErrorCollectionParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
         return new ErrorCollection(
41 41
             array_map(
42
-                function ($error) {
42
+                function($error) {
43 43
                     return $this->errorParser->parse($error);
44 44
                 },
45 45
                 $data
Please login to merge, or discard this patch.
src/Parsers/CollectionParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
         return Collection::make($data)
38 38
             ->map(
39
-                function ($item) {
39
+                function($item) {
40 40
                     return $this->itemParser->parse($item);
41 41
                 }
42 42
             );
Please login to merge, or discard this patch.
src/Parsers/ItemParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         }
80 80
 
81 81
         if (property_exists($data, 'attributes')) {
82
-            $item->fill((array) $data->attributes);
82
+            $item->fill((array)$data->attributes);
83 83
         }
84 84
 
85 85
         if (property_exists($data, 'relationships')) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         if (is_array($data)) {
167 167
             return Collection::make($data)
168 168
                 ->map(
169
-                    function ($identifier) {
169
+                    function($identifier) {
170 170
                         return $this->parseRelationshipData($identifier);
171 171
                     }
172 172
                 );
Please login to merge, or discard this patch.
src/Parsers/ResponseParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $document = new InvalidResponseDocument();
35 35
 
36 36
         if ($this->responseHasBody($response)) {
37
-            $document = $this->parser->parse((string) $response->getBody());
37
+            $document = $this->parser->parse((string)$response->getBody());
38 38
         } elseif ($this->responseHasSuccessfulStatusCode($response)) {
39 39
             $document = new Document();
40 40
         }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     private function responseHasBody(ResponseInterface $response): bool
53 53
     {
54
-        return (bool) $response->getBody()->getSize();
54
+        return (bool)$response->getBody()->getSize();
55 55
     }
56 56
 
57 57
     /**
Please login to merge, or discard this patch.
src/Parsers/LinksParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@
 block discarded – undo
57 57
         }
58 58
 
59 59
         return new Links(
60
-            Collection::wrap((array) $data)
60
+            Collection::wrap((array)$data)
61 61
                 ->map(
62
-                    function ($link, $name) {
62
+                    function($link, $name) {
63 63
                         return $this->buildLink($link, $name);
64 64
                     }
65 65
                 )
Please login to merge, or discard this patch.
src/Concerns/HasType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
      */
35 35
     public function hasType(): bool
36 36
     {
37
-        return (bool) $this->type;
37
+        return (bool)$this->type;
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
src/Parsers/MetaParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,6 +21,6 @@
 block discarded – undo
21 21
             throw new ValidationException(sprintf('Meta MUST be an object, "%s" given.', gettype($data)));
22 22
         }
23 23
 
24
-        return new Meta((array) $data);
24
+        return new Meta((array)$data);
25 25
     }
26 26
 }
Please login to merge, or discard this patch.