Passed
Pull Request — main (#156)
by Tom
12:03
created
src/Config.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      *                  Be warned, using the same groupSuffix with two different
25 25
      *                  groups can cause collisions.
26 26
      */
27
-    protected string|null $groupSuffix = null;
27
+    protected string | null $groupSuffix = null;
28 28
 
29 29
     /**
30 30
      * @var bool When set to true hydrator results will be cached for the
@@ -52,20 +52,20 @@  discard block
 block discarded – undo
52 52
      *                all hydrators will extract by reference.  This overrides
53 53
      *                per-entity attribute configuration.
54 54
      */
55
-    protected bool|null $globalByValue = null;
55
+    protected bool | null $globalByValue = null;
56 56
 
57 57
     /**
58 58
      * @var string|null When set, the entityPrefix will be removed from each
59 59
      *                  type name.  This simplifies type names and makes reading
60 60
      *                  the GraphQL documentation easier.
61 61
      */
62
-    protected string|null $entityPrefix = null;
62
+    protected string | null $entityPrefix = null;
63 63
 
64 64
     /**
65 65
      * @var bool|null When set to true entity fields will be
66 66
      *                sorted alphabetically
67 67
      */
68
-    protected bool|null $sortFields = null;
68
+    protected bool | null $sortFields = null;
69 69
 
70 70
     /**
71 71
      * @var string[] An array of filters to exclude from
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
         return $this->group;
100 100
     }
101 101
 
102
-    protected function setGroupSuffix(string|null $groupSuffix): self
102
+    protected function setGroupSuffix(string | null $groupSuffix): self
103 103
     {
104 104
         $this->groupSuffix = $groupSuffix;
105 105
 
106 106
         return $this;
107 107
     }
108 108
 
109
-    public function getGroupSuffix(): string|null
109
+    public function getGroupSuffix(): string | null
110 110
     {
111 111
         return $this->groupSuffix;
112 112
     }
@@ -161,38 +161,38 @@  discard block
 block discarded – undo
161 161
         return $this->globalIgnore;
162 162
     }
163 163
 
164
-    protected function setGlobalByValue(bool|null $globalByValue): self
164
+    protected function setGlobalByValue(bool | null $globalByValue): self
165 165
     {
166 166
         $this->globalByValue = $globalByValue;
167 167
 
168 168
         return $this;
169 169
     }
170 170
 
171
-    public function getGlobalByValue(): bool|null
171
+    public function getGlobalByValue(): bool | null
172 172
     {
173 173
         return $this->globalByValue;
174 174
     }
175 175
 
176
-    protected function setEntityPrefix(string|null $entityPrefix): self
176
+    protected function setEntityPrefix(string | null $entityPrefix): self
177 177
     {
178 178
         $this->entityPrefix = $entityPrefix;
179 179
 
180 180
         return $this;
181 181
     }
182 182
 
183
-    public function getEntityPrefix(): string|null
183
+    public function getEntityPrefix(): string | null
184 184
     {
185 185
         return $this->entityPrefix;
186 186
     }
187 187
 
188
-    public function setSortFields(bool|null $sortFields): self
188
+    public function setSortFields(bool | null $sortFields): self
189 189
     {
190 190
         $this->sortFields = $sortFields;
191 191
 
192 192
         return $this;
193 193
     }
194 194
 
195
-    public function getSortFields(): bool|null
195
+    public function getSortFields(): bool | null
196 196
     {
197 197
         return $this->sortFields;
198 198
     }
Please login to merge, or discard this patch.
src/Criteria/CriteriaFactory.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
     /** @param mixed[]|null $associationMetadata */
38 38
     public function get(
39 39
         Entity $targetEntity,
40
-        Entity|null $owningEntity = null,
41
-        string|null $associationName = null,
42
-        array|null $associationMetadata = null,
40
+        Entity | null $owningEntity = null,
41
+        string | null $associationName = null,
42
+        array | null $associationMetadata = null,
43 43
     ): InputObjectType {
44 44
         $typeName = $owningEntity ?
45 45
             $owningEntity->getTypeName() . '_' . $associationName . '_filter'
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
         // Limit association filters
66 66
         if ($associationName) {
67 67
             $excludeCriteria = $associationMetadata['excludeCriteria'];
68
-            $allowedFilters  = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) {
69
-                return ! in_array($value, $excludeCriteria);
68
+            $allowedFilters  = array_filter($allowedFilters, static function($value) use ($excludeCriteria) {
69
+                return !in_array($value, $excludeCriteria);
70 70
             });
71 71
         }
72 72
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
         foreach ($classMetadata->getFieldNames() as $fieldName) {
96 96
             // Only process fields that are in the graphql metadata
97
-            if (! in_array($fieldName, array_keys($entityMetadata['fields']))) {
97
+            if (!in_array($fieldName, array_keys($entityMetadata['fields']))) {
98 98
                 continue;
99 99
             }
100 100
 
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
                 $fieldExcludeCriteria = $entityMetadata['fields'][$fieldName]['excludeCriteria'];
114 114
                 $allowedFilters       = array_filter(
115 115
                     $allowedFilters,
116
-                    static function ($value) use ($fieldExcludeCriteria) {
117
-                        return ! in_array($value, $fieldExcludeCriteria);
116
+                    static function($value) use ($fieldExcludeCriteria) {
117
+                        return !in_array($value, $fieldExcludeCriteria);
118 118
                     },
119 119
                 );
120 120
             }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         // Add eq filter for to-one associations
140 140
         foreach ($classMetadata->getAssociationNames() as $associationName) {
141 141
             // Only process fields which are in the graphql metadata
142
-            if (! in_array($associationName, array_keys($entityMetadata['fields']))) {
142
+            if (!in_array($associationName, array_keys($entityMetadata['fields']))) {
143 143
                 continue;
144 144
             }
145 145
 
Please login to merge, or discard this patch.