Passed
Push — main ( 21e8dc...62d82d )
by Pavel
01:31
created
src/Serializer.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,9 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected function serializeAttributes(object $resource, array|null $fields): array|null
89 89
     {
90
-        if (($this->options[static::OPTIONS_NO_ATTRIBUTES] ?? false) === true) return null;
90
+        if (($this->options[static::OPTIONS_NO_ATTRIBUTES] ?? false) === true) {
91
+            return null;
92
+        }
91 93
 
92 94
         $result = [];
93 95
 
@@ -109,14 +111,18 @@  discard block
 block discarded – undo
109 111
      */
110 112
     protected function serializeRelationships(object $resource): array|null
111 113
     {
112
-        if ($this->includeset === null || count($this->includeset) === 0) return null;
114
+        if ($this->includeset === null || count($this->includeset) === 0) {
115
+            return null;
116
+        }
113 117
 
114 118
         $relationships = [];
115 119
         $relationshipsMap = $this->metadata->getResourceRelationships($resource);
116 120
 
117 121
         foreach ($this->includeset as $relation => $childIncludeset) {
118 122
             // TODO: Maybe we should throw an exception here
119
-            if (!isset($relationshipsMap[$relation])) continue;
123
+            if (!isset($relationshipsMap[$relation])) {
124
+                continue;
125
+            }
120 126
 
121 127
             $value = $relationshipsMap[$relation]->getValue($resource);
122 128
 
Please login to merge, or discard this patch.
src/Includeset.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@
 block discarded – undo
25 25
             $parserInclude = explode(Includeset::RELATION_SEPARATOR, $item, 2);
26 26
             $relation = array_shift($parserInclude);
27 27
 
28
-            if (empty($relation)) continue;
28
+            if (empty($relation)) {
29
+                continue;
30
+            }
29 31
 
30 32
             $rawChildren = array_shift($parserInclude) ?? '';
31 33
 
Please login to merge, or discard this patch.