Passed
Pull Request — main (#15)
by Tom
02:13
created
src/Type/Time.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
22 22
     {
23 23
         // @codeCoverageIgnoreStart
24
-        if (! $valueNode instanceof StringValueNode) {
24
+        if (!$valueNode instanceof StringValueNode) {
25 25
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
26 26
         }
27 27
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function parseValue(mixed $value): PHPDateTime
34 34
     {
35
-        if (! is_string($value)) {
35
+        if (!is_string($value)) {
36 36
             throw new Error('Time is not a string: ' . $value);
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Type/DateImmutable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
22 22
     {
23 23
         // @codeCoverageIgnoreStart
24
-        if (! $valueNode instanceof StringValueNode) {
24
+        if (!$valueNode instanceof StringValueNode) {
25 25
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
26 26
         }
27 27
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function parseValue(mixed $value): PHPDateTime|false
34 34
     {
35
-        if (! is_string($value)) {
35
+        if (!is_string($value)) {
36 36
             throw new Error('Date is not a string: ' . $value);
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Type/TimeImmutable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
22 22
     {
23 23
         // @codeCoverageIgnoreStart
24
-        if (! $valueNode instanceof StringValueNode) {
24
+        if (!$valueNode instanceof StringValueNode) {
25 25
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
26 26
         }
27 27
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function parseValue(mixed $value): PHPDateTime|false
34 34
     {
35
-        if (! is_string($value)) {
35
+        if (!is_string($value)) {
36 36
             throw new Error('Time is not a string: ' . $value);
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Type/Json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function parseValue(mixed $value): array|null
31 31
     {
32
-        if (! is_string($value)) {
32
+        if (!is_string($value)) {
33 33
             throw new Error('Json is not a string: ' . $value);
34 34
         }
35 35
 
Please login to merge, or discard this patch.
src/Type/DateTime.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function parseLiteral(ASTNode $valueNode, array|null $variables = null): string
22 22
     {
23 23
         // @codeCoverageIgnoreStart
24
-        if (! $valueNode instanceof StringValueNode) {
24
+        if (!$valueNode instanceof StringValueNode) {
25 25
             throw new Error('Query error: Can only parse strings got: ' . $valueNode->kind, $valueNode);
26 26
         }
27 27
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function parseValue(mixed $value): PHPDateTime
34 34
     {
35
-        if (! is_string($value)) {
35
+        if (!is_string($value)) {
36 36
             throw new Error('Date is not a string: ' . $value);
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Resolve/ResolveCollectionFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function get(Entity $entity): Closure
59 59
     {
60
-        return function ($source, array $args, $context, ResolveInfo $info) {
60
+        return function($source, array $args, $context, ResolveInfo $info) {
61 61
             $fieldResolver = $this->fieldResolver;
62 62
             $collection    = $fieldResolver($source, $args, $context, $info);
63 63
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             }
120 120
         }
121 121
 
122
-        if (! empty($orderBy)) {
122
+        if (!empty($orderBy)) {
123 123
             $criteria->orderBy($orderBy);
124 124
         }
125 125
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                 'cursor' => $cursors['last'],
228 228
             ];
229 229
 
230
-            if (! $cursors['first']) {
230
+            if (!$cursors['first']) {
231 231
                 $cursors['first'] = $cursors['last'];
232 232
             }
233 233
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
             $limit = $associationLimit;
260 260
         }
261 261
 
262
-        if (! $limit) {
262
+        if (!$limit) {
263 263
             $limit = $this->config->getLimit();
264 264
         }
265 265
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
             $offset = 0;
281 281
         }
282 282
 
283
-        if ($paginationFields['last'] && ! $paginationFields['before']) {
283
+        if ($paginationFields['last'] && !$paginationFields['before']) {
284 284
             $offset = $itemCount - $paginationFields['last'];
285 285
         }
286 286
 
Please login to merge, or discard this patch.
src/Resolve/FieldResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
          * For disabled hydrator cache, store only last hydrator result and reuse for consecutive calls
45 45
          * then drop the cache if it doesn't hit.
46 46
          */
47
-        if (! $this->config->getUseHydratorCache()) {
47
+        if (!$this->config->getUseHydratorCache()) {
48 48
             if (isset($this->extractValues[$splObjectHash])) {
49 49
                 return $this->extractValues[$splObjectHash][$info->fieldName] ?? null;
50 50
             }
Please login to merge, or discard this patch.
src/Resolve/ResolveEntityFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function get(Entity $entity, string $eventName): Closure
35 35
     {
36
-        return function ($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
36
+        return function($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) {
37 37
             $entityClass = $entity->getEntityClass();
38 38
 
39 39
             $queryBuilderFilter = (new Applicator($this->entityManager, $entityClass))
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $itemCount = $paginator->count();
191 191
 
192 192
         // Rebuild paginator if needed
193
-        if ($paginationFields['last'] && ! $paginationFields['before']) {
193
+        if ($paginationFields['last'] && !$paginationFields['before']) {
194 194
             $offsetAndLimit['offset'] = $itemCount - $paginationFields['last'];
195 195
             $queryBuilder->setFirstResult($offsetAndLimit['offset']);
196 196
             $paginator = new Paginator($queryBuilder->getQuery());
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                 'cursor' => $cursors['last'],
205 205
             ];
206 206
 
207
-            if (! $cursors['first']) {
207
+            if (!$cursors['first']) {
208 208
                 $cursors['first'] = $cursors['last'];
209 209
             }
210 210
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
         $limit = $this->metadata[$entity->getEntityClass()]['limit'];
234 234
 
235
-        if (! $limit) {
235
+        if (!$limit) {
236 236
             $limit = $this->config->getLimit();
237 237
         }
238 238
 
Please login to merge, or discard this patch.
src/Input/InputFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $fields       = [];
42 42
         $targetEntity = $this->typeManager->build(Entity::class, $id);
43 43
 
44
-        if (! count($requiredFields) && ! count($optionalFields)) {
44
+        if (!count($requiredFields) && !count($optionalFields)) {
45 45
             $this->addAllFieldsAsRequired($targetEntity, $fields);
46 46
         } else {
47 47
             $this->addRequiredFields($targetEntity, $requiredFields, $fields);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         array &$fields,
66 66
     ): void {
67 67
         foreach ($this->entityManager->getClassMetadata($targetEntity->getEntityClass())->getFieldNames() as $fieldName) {
68
-            if (! in_array($fieldName, $optionalFields) && $optionalFields !== ['*']) {
68
+            if (!in_array($fieldName, $optionalFields) && $optionalFields !== ['*']) {
69 69
                 continue;
70 70
             }
71 71
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         array &$fields,
97 97
     ): void {
98 98
         foreach ($this->entityManager->getClassMetadata($targetEntity->getEntityClass())->getFieldNames() as $fieldName) {
99
-            if (! in_array($fieldName, $requiredFields) && $requiredFields !== ['*']) {
99
+            if (!in_array($fieldName, $requiredFields) && $requiredFields !== ['*']) {
100 100
                 continue;
101 101
             }
102 102
 
Please login to merge, or discard this patch.