Passed
Pull Request — master (#108)
by
unknown
01:57 queued 10s
created
src/Jsonapi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,6 +76,6 @@
 block discarded – undo
76 76
     #[\ReturnTypeWillChange]
77 77
     public function jsonSerialize()
78 78
     {
79
-        return (object) $this->toArray();
79
+        return (object)$this->toArray();
80 80
     }
81 81
 }
Please login to merge, or discard this patch.
src/Meta.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,6 +76,6 @@
 block discarded – undo
76 76
     #[\ReturnTypeWillChange]
77 77
     public function jsonSerialize()
78 78
     {
79
-        return (object) $this->toArray();
79
+        return (object)$this->toArray();
80 80
     }
81 81
 }
Please login to merge, or discard this patch.
src/Links.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,6 +76,6 @@
 block discarded – undo
76 76
     #[\ReturnTypeWillChange]
77 77
     public function jsonSerialize()
78 78
     {
79
-        return (object) $this->toArray();
79
+        return (object)$this->toArray();
80 80
     }
81 81
 }
Please login to merge, or discard this patch.
src/DocumentFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@
 block discarded – undo
39 39
     {
40 40
         return Collection::make($item->getRelations())
41 41
             ->reject(
42
-                static function ($relationship) {
42
+                static function($relationship) {
43 43
                     /* @var \Swis\JsonApi\Client\Interfaces\OneRelationInterface|\Swis\JsonApi\Client\Interfaces\ManyRelationInterface $relationship */
44
-                    return $relationship->shouldOmitIncluded() || ! $relationship->hasIncluded();
44
+                    return $relationship->shouldOmitIncluded() || !$relationship->hasIncluded();
45 45
                 }
46 46
             )
47 47
             ->flatMap(
48
-                static function ($relationship) {
48
+                static function($relationship) {
49 49
                     /* @var \Swis\JsonApi\Client\Interfaces\OneRelationInterface|\Swis\JsonApi\Client\Interfaces\ManyRelationInterface $relationship */
50 50
                     return Collection::wrap($relationship->getIncluded());
51 51
                 }
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
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function parse($data): ErrorCollection
26 26
     {
27
-        if (! is_array($data)) {
27
+        if (!is_array($data)) {
28 28
             throw new ValidationException(sprintf('ErrorCollection MUST be an array, "%s" given.', gettype($data)));
29 29
         }
30 30
         if (count($data) === 0) {
Please login to merge, or discard this patch.
src/Parsers/JsonapiParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
      */
25 25
     public function parse($data): Jsonapi
26 26
     {
27
-        if (! is_object($data)) {
27
+        if (!is_object($data)) {
28 28
             throw new ValidationException(sprintf('Jsonapi MUST be an object, "%s" given.', gettype($data)));
29 29
         }
30
-        if (property_exists($data, 'version') && ! is_string($data->version)) {
30
+        if (property_exists($data, 'version') && !is_string($data->version)) {
31 31
             throw new ValidationException(sprintf('Jsonapi property "version" MUST be a string, "%s" given.', gettype($data->version)));
32 32
         }
33 33
 
Please login to merge, or discard this patch.
src/Parsers/MetaParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
      */
18 18
     public function parse($data): Meta
19 19
     {
20
-        if (! is_object($data)) {
20
+        if (!is_object($data)) {
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.
src/Parsers/LinksParser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function parse($data, string $source): Links
41 41
     {
42
-        if (! is_object($data)) {
42
+        if (!is_object($data)) {
43 43
             throw new ValidationException(sprintf('Links MUST be an object, "%s" given.', gettype($data)));
44 44
         }
45
-        if ($source === self::SOURCE_RELATIONSHIP && ! property_exists($data, 'self') && ! property_exists($data, 'related')) {
45
+        if ($source === self::SOURCE_RELATIONSHIP && !property_exists($data, 'self') && !property_exists($data, 'related')) {
46 46
             throw new ValidationException('Relationship links object MUST contain at least one of the following properties: `self`, `related`.');
47 47
         }
48 48
 
49 49
         return new Links(
50
-            Collection::wrap((array) $data)
50
+            Collection::wrap((array)$data)
51 51
                 ->map(fn ($link, $name) => $this->buildLink($link, $name))
52 52
                 ->toArray()
53 53
         );
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     private function buildLink($data, string $name): ?Link
60 60
     {
61
-        if (in_array($name, self::LINKS_THAT_MAY_NOT_BE_NULL_WHEN_PRESENT, true) && ! is_string($data) && ! is_object($data)) {
61
+        if (in_array($name, self::LINKS_THAT_MAY_NOT_BE_NULL_WHEN_PRESENT, true) && !is_string($data) && !is_object($data)) {
62 62
             throw new ValidationException(sprintf('Link "%s" MUST be an object or string, "%s" given.', $name, gettype($data)));
63 63
         }
64 64
 
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
             return new Link($data);
71 71
         }
72 72
 
73
-        if (! is_object($data)) {
73
+        if (!is_object($data)) {
74 74
             throw new ValidationException(sprintf('Link "%s" MUST be an object, string or null, "%s" given.', $name, gettype($data)));
75 75
         }
76
-        if (! property_exists($data, 'href')) {
76
+        if (!property_exists($data, 'href')) {
77 77
             throw new ValidationException(sprintf('Link "%s" MUST have a "href" attribute.', $name));
78 78
         }
79 79
 
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
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function parse($data): Collection
26 26
     {
27
-        if (! is_array($data)) {
27
+        if (!is_array($data)) {
28 28
             throw new ValidationException(sprintf('ResourceCollection MUST be an array, "%s" given.', gettype($data)));
29 29
         }
30 30
 
Please login to merge, or discard this patch.