Passed
Pull Request — main (#91)
by Tom
03:52 queued 01:01
created
src/Criteria/CriteriaFactory.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
     /** @param mixed[]|null $associationMetadata */
35 35
     public function get(
36 36
         Entity $targetEntity,
37
-        Entity|null $owningEntity = null,
38
-        string|null $associationName = null,
39
-        array|null $associationMetadata = null,
37
+        Entity | null $owningEntity = null,
38
+        string | null $associationName = null,
39
+        array | null $associationMetadata = null,
40 40
     ): InputObjectType {
41 41
         if ($owningEntity) {
42 42
             $typeName = $owningEntity->getTypeName() . '_' . $associationName . '_Filter';
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
         // Limit entity filters
75 75
         if ($entityMetadata['excludeCriteria']) {
76 76
             $excludeCriteria = $entityMetadata['excludeCriteria'];
77
-            $allowedFilters  = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) {
78
-                return ! in_array($value, $excludeCriteria);
77
+            $allowedFilters  = array_filter($allowedFilters, static function($value) use ($excludeCriteria) {
78
+                return !in_array($value, $excludeCriteria);
79 79
             });
80 80
         }
81 81
 
82 82
         // Limit association filters
83 83
         if ($associationName) {
84 84
             $excludeCriteria = $associationMetadata['excludeCriteria'];
85
-            $allowedFilters  = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) {
86
-                return ! in_array($value, $excludeCriteria);
85
+            $allowedFilters  = array_filter($allowedFilters, static function($value) use ($excludeCriteria) {
86
+                return !in_array($value, $excludeCriteria);
87 87
             });
88 88
         }
89 89
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $graphQLType = null;
92 92
 
93 93
             // Only process fields which are in the graphql metadata
94
-            if (! in_array($fieldName, array_keys($entityMetadata['fields']))) {
94
+            if (!in_array($fieldName, array_keys($entityMetadata['fields']))) {
95 95
                 continue;
96 96
             }
97 97
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
             // Build simple filters
121 121
             foreach ($descriptions as $filter => $docs) {
122
-                if (! in_array($filter, $allowedFilters)) {
122
+                if (!in_array($filter, $allowedFilters)) {
123 123
                     continue;
124 124
                 }
125 125
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 ];
220 220
             }
221 221
 
222
-            if (! in_array(Filters::CONTAINS, $allowedFilters)) {
222
+            if (!in_array(Filters::CONTAINS, $allowedFilters)) {
223 223
                 continue;
224 224
             }
225 225
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
         foreach ($classMetadata->getAssociationNames() as $associationName) {
234 234
             // Only process fields which are in the graphql metadata
235
-            if (! in_array($associationName, array_keys($entityMetadata['fields']))) {
235
+            if (!in_array($associationName, array_keys($entityMetadata['fields']))) {
236 236
                 continue;
237 237
             }
238 238
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 
263 263
         $arrayObject = new ArrayObject([
264 264
             'name' => $typeName,
265
-            'fields' => static function () use ($fields) {
265
+            'fields' => static function() use ($fields) {
266 266
                 return $fields;
267 267
             },
268 268
         ]);
Please login to merge, or discard this patch.
src/Resolve/ResolveCollectionFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     public function get(Entity $entity): Closure
54 54
     {
55
-        return function ($source, $args, $context, ResolveInfo $resolveInfo) {
55
+        return function($source, $args, $context, ResolveInfo $resolveInfo) {
56 56
             $fieldResolver = $this->fieldResolver;
57 57
             $collection    = $fieldResolver($source, $args, $context, $resolveInfo);
58 58
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             }
126 126
         }
127 127
 
128
-        if (! empty($orderBy)) {
128
+        if (!empty($orderBy)) {
129 129
             $criteria->orderBy($orderBy);
130 130
         }
131 131
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         // Get total count from collection then match
184 184
         $itemCount = count($collection->matching($criteria));
185 185
 
186
-        if ($last && ! $before) {
186
+        if ($last && !$before) {
187 187
             $offset = $itemCount - $last;
188 188
         }
189 189
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             ];
212 212
 
213 213
             $lastCursor = $cursor;
214
-            if (! $firstCursor) {
214
+            if (!$firstCursor) {
215 215
                 $firstCursor = $cursor;
216 216
             }
217 217
 
Please login to merge, or discard this patch.
src/Resolve/ResolveEntityFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function get(Entity $entity, string $eventName): Closure
34 34
     {
35
-        return function ($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
35
+        return function($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
36 36
             $entityClass = $entity->getEntityClass();
37 37
 
38 38
             $queryBuilderFilter = (new Applicator($this->entityManager, $entityClass))
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $paginator = new Paginator($queryBuilder->getQuery());
192 192
         $itemCount = $paginator->count();
193 193
 
194
-        if ($last && ! $before) {
194
+        if ($last && !$before) {
195 195
             $offset = $itemCount - $last;
196 196
             $queryBuilder->setFirstResult($offset);
197 197
             $paginator = new Paginator($queryBuilder->getQuery());
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             ];
211 211
 
212 212
             $lastCursor = $cursor;
213
-            if (! $firstCursor) {
213
+            if (!$firstCursor) {
214 214
                 $firstCursor = $cursor;
215 215
             }
216 216
 
Please login to merge, or discard this patch.