GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Branch utils-cs (6e2982)
by Šimon
03:40
created
src/Executor/Executor.php 1 patch
Spacing   +41 added lines, -43 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
     private function __construct(ExecutionContext $context)
66 66
     {
67
-        if (! self::$UNDEFINED) {
67
+        if (!self::$UNDEFINED) {
68 68
             self::$UNDEFINED = Utils::undefined();
69 69
         }
70 70
 
@@ -212,10 +212,10 @@  discard block
 block discarded – undo
212 212
         foreach ($documentNode->definitions as $definition) {
213 213
             switch ($definition->kind) {
214 214
                 case NodeKind::OPERATION_DEFINITION:
215
-                    if (! $operationName && $operation) {
215
+                    if (!$operationName && $operation) {
216 216
                         $hasMultipleAssumedOperations = true;
217 217
                     }
218
-                    if (! $operationName ||
218
+                    if (!$operationName ||
219 219
                         (isset($definition->name) && $definition->name->value === $operationName)) {
220 220
                         $operation = $definition;
221 221
                     }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             }
227 227
         }
228 228
 
229
-        if (! $operation) {
229
+        if (!$operation) {
230 230
             if ($operationName) {
231 231
                 $errors[] = new Error(sprintf('Unknown operation named "%s".', $operationName));
232 232
             } else {
@@ -285,14 +285,14 @@  discard block
 block discarded – undo
285 285
         // field and its descendants will be omitted, and sibling fields will still
286 286
         // be executed. An execution which encounters errors will still result in a
287 287
         // resolved Promise.
288
-        $result = $this->exeContext->promises->create(function (callable $resolve) {
288
+        $result = $this->exeContext->promises->create(function(callable $resolve) {
289 289
             return $resolve($this->executeOperation($this->exeContext->operation, $this->exeContext->rootValue));
290 290
         });
291 291
 
292 292
         return $result
293 293
             ->then(
294 294
                 null,
295
-                function ($error) {
295
+                function($error) {
296 296
                     // Errors from sub-fields of a NonNull type may propagate to the top level,
297 297
                     // at which point we still log the error and null the parent field, which
298 298
                     // in this case is the entire response.
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
                     return null;
302 302
                 }
303 303
             )
304
-            ->then(function ($data) {
304
+            ->then(function($data) {
305 305
                 if ($data !== null) {
306 306
                     $data = (array) $data;
307 307
                 }
@@ -330,14 +330,13 @@  discard block
 block discarded – undo
330 330
         // Similar to completeValueCatchingError.
331 331
         try {
332 332
             $result = $operation->operation === 'mutation' ?
333
-                $this->executeFieldsSerially($type, $rootValue, $path, $fields) :
334
-                $this->executeFields($type, $rootValue, $path, $fields);
333
+                $this->executeFieldsSerially($type, $rootValue, $path, $fields) : $this->executeFields($type, $rootValue, $path, $fields);
335 334
 
336 335
             $promise = $this->getPromise($result);
337 336
             if ($promise) {
338 337
                 return $promise->then(
339 338
                     null,
340
-                    function ($error) {
339
+                    function($error) {
341 340
                         $this->exeContext->addError($error);
342 341
 
343 342
                         return null;
@@ -364,7 +363,7 @@  discard block
 block discarded – undo
364 363
         switch ($operation->operation) {
365 364
             case 'query':
366 365
                 $queryType = $schema->getQueryType();
367
-                if (! $queryType) {
366
+                if (!$queryType) {
368 367
                     throw new Error(
369 368
                         'Schema does not define the required query root type.',
370 369
                         [$operation]
@@ -374,7 +373,7 @@  discard block
 block discarded – undo
374 373
                 return $queryType;
375 374
             case 'mutation':
376 375
                 $mutationType = $schema->getMutationType();
377
-                if (! $mutationType) {
376
+                if (!$mutationType) {
378 377
                     throw new Error(
379 378
                         'Schema is not configured for mutations.',
380 379
                         [$operation]
@@ -384,7 +383,7 @@  discard block
 block discarded – undo
384 383
                 return $mutationType;
385 384
             case 'subscription':
386 385
                 $subscriptionType = $schema->getSubscriptionType();
387
-                if (! $subscriptionType) {
386
+                if (!$subscriptionType) {
388 387
                     throw new Error(
389 388
                         'Schema is not configured for subscriptions.',
390 389
                         [$operation]
@@ -423,18 +422,18 @@  discard block
 block discarded – undo
423 422
         foreach ($selectionSet->selections as $selection) {
424 423
             switch ($selection->kind) {
425 424
                 case NodeKind::FIELD:
426
-                    if (! $this->shouldIncludeNode($selection)) {
425
+                    if (!$this->shouldIncludeNode($selection)) {
427 426
                         break;
428 427
                     }
429 428
                     $name = self::getFieldEntryKey($selection);
430
-                    if (! isset($fields[$name])) {
429
+                    if (!isset($fields[$name])) {
431 430
                         $fields[$name] = new \ArrayObject();
432 431
                     }
433 432
                     $fields[$name][] = $selection;
434 433
                     break;
435 434
                 case NodeKind::INLINE_FRAGMENT:
436
-                    if (! $this->shouldIncludeNode($selection) ||
437
-                        ! $this->doesFragmentConditionMatch($selection, $runtimeType)
435
+                    if (!$this->shouldIncludeNode($selection) ||
436
+                        !$this->doesFragmentConditionMatch($selection, $runtimeType)
438 437
                     ) {
439 438
                         break;
440 439
                     }
@@ -447,14 +446,14 @@  discard block
 block discarded – undo
447 446
                     break;
448 447
                 case NodeKind::FRAGMENT_SPREAD:
449 448
                     $fragName = $selection->name->value;
450
-                    if (! empty($visitedFragmentNames[$fragName]) || ! $this->shouldIncludeNode($selection)) {
449
+                    if (!empty($visitedFragmentNames[$fragName]) || !$this->shouldIncludeNode($selection)) {
451 450
                         break;
452 451
                     }
453 452
                     $visitedFragmentNames[$fragName] = true;
454 453
 
455 454
                     /** @var FragmentDefinitionNode|null $fragment */
456 455
                     $fragment = $exeContext->fragments[$fragName] ?? null;
457
-                    if (! $fragment || ! $this->doesFragmentConditionMatch($fragment, $runtimeType)) {
456
+                    if (!$fragment || !$this->doesFragmentConditionMatch($fragment, $runtimeType)) {
458 457
                         break;
459 458
                     }
460 459
                     $this->collectFields(
@@ -557,7 +556,7 @@  discard block
 block discarded – undo
557 556
     {
558 557
         $prevPromise = $this->exeContext->promises->createFulfilled([]);
559 558
 
560
-        $process = function ($results, $responseName, $path, $parentType, $sourceValue, $fieldNodes) {
559
+        $process = function($results, $responseName, $path, $parentType, $sourceValue, $fieldNodes) {
561 560
             $fieldPath   = $path;
562 561
             $fieldPath[] = $responseName;
563 562
             $result      = $this->resolveField($parentType, $sourceValue, $fieldNodes, $fieldPath);
@@ -566,7 +565,7 @@  discard block
 block discarded – undo
566 565
             }
567 566
             $promise = $this->getPromise($result);
568 567
             if ($promise) {
569
-                return $promise->then(function ($resolvedResult) use ($responseName, $results) {
568
+                return $promise->then(function($resolvedResult) use ($responseName, $results) {
570 569
                     $results[$responseName] = $resolvedResult;
571 570
 
572 571
                     return $results;
@@ -578,7 +577,7 @@  discard block
 block discarded – undo
578 577
         };
579 578
 
580 579
         foreach ($fields as $responseName => $fieldNodes) {
581
-            $prevPromise = $prevPromise->then(function ($resolvedResults) use (
580
+            $prevPromise = $prevPromise->then(function($resolvedResults) use (
582 581
                 $process,
583 582
                 $responseName,
584 583
                 $path,
@@ -590,7 +589,7 @@  discard block
 block discarded – undo
590 589
             });
591 590
         }
592 591
 
593
-        return $prevPromise->then(function ($resolvedResults) {
592
+        return $prevPromise->then(function($resolvedResults) {
594 593
             return self::fixResultsIfEmptyArray($resolvedResults);
595 594
         });
596 595
     }
@@ -615,7 +614,7 @@  discard block
 block discarded – undo
615 614
         $fieldName = $fieldNode->name->value;
616 615
         $fieldDef  = $this->getFieldDef($exeContext->schema, $parentType, $fieldName);
617 616
 
618
-        if (! $fieldDef) {
617
+        if (!$fieldDef) {
619 618
             return self::$UNDEFINED;
620 619
         }
621 620
 
@@ -781,7 +780,7 @@  discard block
 block discarded – undo
781 780
             if ($promise) {
782 781
                 return $promise->then(
783 782
                     null,
784
-                    function ($error) use ($exeContext) {
783
+                    function($error) use ($exeContext) {
785 784
                         $exeContext->addError($error);
786 785
 
787 786
                         return $this->exeContext->promises->createFulfilled(null);
@@ -824,11 +823,11 @@  discard block
 block discarded – undo
824 823
                 $path,
825 824
                 $result
826 825
             );
827
-            $promise   = $this->getPromise($completed);
826
+            $promise = $this->getPromise($completed);
828 827
             if ($promise) {
829 828
                 return $promise->then(
830 829
                     null,
831
-                    function ($error) use ($fieldNodes, $path) {
830
+                    function($error) use ($fieldNodes, $path) {
832 831
                         return $this->exeContext->promises->createRejected(Error::createLocatedError(
833 832
                             $error,
834 833
                             $fieldNodes,
@@ -885,7 +884,7 @@  discard block
 block discarded – undo
885 884
 
886 885
         // If result is a Promise, apply-lift over completeValue.
887 886
         if ($promise) {
888
-            return $promise->then(function (&$resolved) use ($returnType, $fieldNodes, $info, $path) {
887
+            return $promise->then(function(&$resolved) use ($returnType, $fieldNodes, $info, $path) {
889 888
                 return $this->completeValue($returnType, $fieldNodes, $info, $path, $resolved);
890 889
             });
891 890
         }
@@ -976,7 +975,7 @@  discard block
 block discarded – undo
976 975
         }
977 976
         if ($this->exeContext->promises->isThenable($value)) {
978 977
             $promise = $this->exeContext->promises->convertThenable($value);
979
-            if (! $promise instanceof Promise) {
978
+            if (!$promise instanceof Promise) {
980 979
                 throw new InvariantViolation(sprintf(
981 980
                     '%s::convertThenable is expected to return instance of GraphQL\Executor\Promise\Promise, got: %s',
982 981
                     get_class($this->exeContext->promises),
@@ -1015,7 +1014,7 @@  discard block
 block discarded – undo
1015 1014
             $fieldPath     = $path;
1016 1015
             $fieldPath[]   = $i++;
1017 1016
             $completedItem = $this->completeValueCatchingError($itemType, $fieldNodes, $info, $fieldPath, $item);
1018
-            if (! $containsPromise && $this->getPromise($completedItem)) {
1017
+            if (!$containsPromise && $this->getPromise($completedItem)) {
1019 1018
                 $containsPromise = true;
1020 1019
             }
1021 1020
             $completedItems[] = $completedItem;
@@ -1071,7 +1070,7 @@  discard block
 block discarded – undo
1071 1070
 
1072 1071
         $promise = $this->getPromise($runtimeType);
1073 1072
         if ($promise) {
1074
-            return $promise->then(function ($resolvedRuntimeType) use (
1073
+            return $promise->then(function($resolvedRuntimeType) use (
1075 1074
                 $returnType,
1076 1075
                 $fieldNodes,
1077 1076
                 $info,
@@ -1165,9 +1164,9 @@  discard block
 block discarded – undo
1165 1164
             }
1166 1165
         }
1167 1166
 
1168
-        if (! empty($promisedIsTypeOfResults)) {
1167
+        if (!empty($promisedIsTypeOfResults)) {
1169 1168
             return $this->exeContext->promises->all($promisedIsTypeOfResults)
1170
-                ->then(function ($isTypeOfResults) use ($possibleTypes) {
1169
+                ->then(function($isTypeOfResults) use ($possibleTypes) {
1171 1170
                     foreach ($isTypeOfResults as $index => $result) {
1172 1171
                         if ($result) {
1173 1172
                             return $possibleTypes[$index];
@@ -1200,14 +1199,14 @@  discard block
 block discarded – undo
1200 1199
         if ($isTypeOf !== null) {
1201 1200
             $promise = $this->getPromise($isTypeOf);
1202 1201
             if ($promise) {
1203
-                return $promise->then(function ($isTypeOfResult) use (
1202
+                return $promise->then(function($isTypeOfResult) use (
1204 1203
                     $returnType,
1205 1204
                     $fieldNodes,
1206 1205
                     $info,
1207 1206
                     $path,
1208 1207
                     &$result
1209 1208
                 ) {
1210
-                    if (! $isTypeOfResult) {
1209
+                    if (!$isTypeOfResult) {
1211 1210
                         throw $this->invalidReturnTypeError($returnType, $result, $fieldNodes);
1212 1211
                     }
1213 1212
 
@@ -1220,7 +1219,7 @@  discard block
 block discarded – undo
1220 1219
                     );
1221 1220
                 });
1222 1221
             }
1223
-            if (! $isTypeOf) {
1222
+            if (!$isTypeOf) {
1224 1223
                 throw $this->invalidReturnTypeError($returnType, $result, $fieldNodes);
1225 1224
             }
1226 1225
         }
@@ -1321,14 +1320,14 @@  discard block
 block discarded – undo
1321 1320
             if ($result === self::$UNDEFINED) {
1322 1321
                 continue;
1323 1322
             }
1324
-            if (! $containsPromise && $this->getPromise($result)) {
1323
+            if (!$containsPromise && $this->getPromise($result)) {
1325 1324
                 $containsPromise = true;
1326 1325
             }
1327 1326
             $finalResults[$responseName] = $result;
1328 1327
         }
1329 1328
 
1330 1329
         // If there are no promises, we can just return the object
1331
-        if (! $containsPromise) {
1330
+        if (!$containsPromise) {
1332 1331
             return self::fixResultsIfEmptyArray($finalResults);
1333 1332
         }
1334 1333
 
@@ -1371,7 +1370,7 @@  discard block
 block discarded – undo
1371 1370
 
1372 1371
         $promise = $this->exeContext->promises->all($valuesAndPromises);
1373 1372
 
1374
-        return $promise->then(function ($values) use ($keys) {
1373
+        return $promise->then(function($values) use ($keys) {
1375 1374
             $resolvedResults = [];
1376 1375
             foreach ($values as $i => $value) {
1377 1376
                 $resolvedResults[$keys[$i]] = $value;
@@ -1394,10 +1393,9 @@  discard block
 block discarded – undo
1394 1393
         &$result
1395 1394
     ) {
1396 1395
         $runtimeType = is_string($runtimeTypeOrName) ?
1397
-            $this->exeContext->schema->getType($runtimeTypeOrName) :
1398
-            $runtimeTypeOrName;
1396
+            $this->exeContext->schema->getType($runtimeTypeOrName) : $runtimeTypeOrName;
1399 1397
 
1400
-        if (! $runtimeType instanceof ObjectType) {
1398
+        if (!$runtimeType instanceof ObjectType) {
1401 1399
             throw new InvariantViolation(
1402 1400
                 sprintf(
1403 1401
                     'Abstract type %s must resolve to an Object type at ' .
@@ -1414,7 +1412,7 @@  discard block
 block discarded – undo
1414 1412
             );
1415 1413
         }
1416 1414
 
1417
-        if (! $this->exeContext->schema->isPossibleType($returnType, $runtimeType)) {
1415
+        if (!$this->exeContext->schema->isPossibleType($returnType, $runtimeType)) {
1418 1416
             throw new InvariantViolation(
1419 1417
                 sprintf('Runtime Object type "%s" is not a possible type for "%s".', $runtimeType, $returnType)
1420 1418
             );
Please login to merge, or discard this patch.
src/Language/Lexer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -489,7 +489,7 @@
 block discarded – undo
489 489
                     case 117:
490 490
                         $position   = $this->position;
491 491
                         list ($hex) = $this->readChars(4, true);
492
-                        if (! preg_match('/[0-9a-fA-F]{4}/', $hex)) {
492
+                        if (!preg_match('/[0-9a-fA-F]{4}/', $hex)) {
493 493
                             throw new SyntaxError(
494 494
                                 $this->source,
495 495
                                 $position - 1,
Please login to merge, or discard this patch.
src/Language/AST/Location.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         $this->endToken   = $endToken;
68 68
         $this->source     = $source;
69 69
 
70
-        if (! $startToken || ! $endToken) {
70
+        if (!$startToken || !$endToken) {
71 71
             return;
72 72
         }
73 73
 
Please login to merge, or discard this patch.
src/Language/Printer.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -94,19 +94,19 @@  discard block
 block discarded – undo
94 94
             $ast,
95 95
             [
96 96
                 'leave' => [
97
-                    NodeKind::NAME => function (Node $node) {
97
+                    NodeKind::NAME => function(Node $node) {
98 98
                         return '' . $node->value;
99 99
                     },
100 100
 
101
-                    NodeKind::VARIABLE => function ($node) {
101
+                    NodeKind::VARIABLE => function($node) {
102 102
                         return '$' . $node->name;
103 103
                     },
104 104
 
105
-                    NodeKind::DOCUMENT => function (DocumentNode $node) {
105
+                    NodeKind::DOCUMENT => function(DocumentNode $node) {
106 106
                         return $this->join($node->definitions, "\n\n") . "\n";
107 107
                     },
108 108
 
109
-                    NodeKind::OPERATION_DEFINITION => function (OperationDefinitionNode $node) {
109
+                    NodeKind::OPERATION_DEFINITION => function(OperationDefinitionNode $node) {
110 110
                         $op           = $node->operation;
111 111
                         $name         = $node->name;
112 112
                         $varDefs      = $this->wrap('(', $this->join($node->variableDefinitions, ', '), ')');
@@ -114,20 +114,20 @@  discard block
 block discarded – undo
114 114
                         $selectionSet = $node->selectionSet;
115 115
                         // Anonymous queries with no directives or variable definitions can use
116 116
                         // the query short form.
117
-                        return ! $name && ! $directives && ! $varDefs && $op === 'query'
117
+                        return !$name && !$directives && !$varDefs && $op === 'query'
118 118
                             ? $selectionSet
119 119
                             : $this->join([$op, $this->join([$name, $varDefs]), $directives, $selectionSet], ' ');
120 120
                     },
121 121
 
122
-                    NodeKind::VARIABLE_DEFINITION => function (VariableDefinitionNode $node) {
122
+                    NodeKind::VARIABLE_DEFINITION => function(VariableDefinitionNode $node) {
123 123
                         return $node->variable . ': ' . $node->type . $this->wrap(' = ', $node->defaultValue);
124 124
                     },
125 125
 
126
-                    NodeKind::SELECTION_SET => function (SelectionSetNode $node) {
126
+                    NodeKind::SELECTION_SET => function(SelectionSetNode $node) {
127 127
                         return $this->block($node->selections);
128 128
                     },
129 129
 
130
-                    NodeKind::FIELD => function (FieldNode $node) {
130
+                    NodeKind::FIELD => function(FieldNode $node) {
131 131
                         return $this->join(
132 132
                             [
133 133
                                 $this->wrap('', $node->alias, ': ') . $node->name . $this->wrap(
@@ -142,15 +142,15 @@  discard block
 block discarded – undo
142 142
                         );
143 143
                     },
144 144
 
145
-                    NodeKind::ARGUMENT => function (ArgumentNode $node) {
145
+                    NodeKind::ARGUMENT => function(ArgumentNode $node) {
146 146
                         return $node->name . ': ' . $node->value;
147 147
                     },
148 148
 
149
-                    NodeKind::FRAGMENT_SPREAD => function (FragmentSpreadNode $node) {
149
+                    NodeKind::FRAGMENT_SPREAD => function(FragmentSpreadNode $node) {
150 150
                         return '...' . $node->name . $this->wrap(' ', $this->join($node->directives, ' '));
151 151
                     },
152 152
 
153
-                    NodeKind::INLINE_FRAGMENT => function (InlineFragmentNode $node) {
153
+                    NodeKind::INLINE_FRAGMENT => function(InlineFragmentNode $node) {
154 154
                         return $this->join(
155 155
                             [
156 156
                                 '...',
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                         );
163 163
                     },
164 164
 
165
-                    NodeKind::FRAGMENT_DEFINITION => function (FragmentDefinitionNode $node) {
165
+                    NodeKind::FRAGMENT_DEFINITION => function(FragmentDefinitionNode $node) {
166 166
                         // Note: fragment variable definitions are experimental and may be changed or removed in the future.
167 167
                         return sprintf('fragment %s', $node->name)
168 168
                             . $this->wrap('(', $this->join($node->variableDefinitions, ', '), ')')
@@ -171,15 +171,15 @@  discard block
 block discarded – undo
171 171
                             . $node->selectionSet;
172 172
                     },
173 173
 
174
-                    NodeKind::INT => function (IntValueNode $node) {
174
+                    NodeKind::INT => function(IntValueNode $node) {
175 175
                         return $node->value;
176 176
                     },
177 177
 
178
-                    NodeKind::FLOAT => function (FloatValueNode $node) {
178
+                    NodeKind::FLOAT => function(FloatValueNode $node) {
179 179
                         return $node->value;
180 180
                     },
181 181
 
182
-                    NodeKind::STRING => function (StringValueNode $node, $key) {
182
+                    NodeKind::STRING => function(StringValueNode $node, $key) {
183 183
                         if ($node->block) {
184 184
                             return $this->printBlockString($node->value, $key === 'description');
185 185
                         }
@@ -187,47 +187,47 @@  discard block
 block discarded – undo
187 187
                         return json_encode($node->value);
188 188
                     },
189 189
 
190
-                    NodeKind::BOOLEAN => function (BooleanValueNode $node) {
190
+                    NodeKind::BOOLEAN => function(BooleanValueNode $node) {
191 191
                         return $node->value ? 'true' : 'false';
192 192
                     },
193 193
 
194
-                    NodeKind::NULL => function (NullValueNode $node) {
194
+                    NodeKind::NULL => function(NullValueNode $node) {
195 195
                         return 'null';
196 196
                     },
197 197
 
198
-                    NodeKind::ENUM => function (EnumValueNode $node) {
198
+                    NodeKind::ENUM => function(EnumValueNode $node) {
199 199
                         return $node->value;
200 200
                     },
201 201
 
202
-                    NodeKind::LST => function (ListValueNode $node) {
202
+                    NodeKind::LST => function(ListValueNode $node) {
203 203
                         return '[' . $this->join($node->values, ', ') . ']';
204 204
                     },
205 205
 
206
-                    NodeKind::OBJECT => function (ObjectValueNode $node) {
206
+                    NodeKind::OBJECT => function(ObjectValueNode $node) {
207 207
                         return '{' . $this->join($node->fields, ', ') . '}';
208 208
                     },
209 209
 
210
-                    NodeKind::OBJECT_FIELD => function (ObjectFieldNode $node) {
210
+                    NodeKind::OBJECT_FIELD => function(ObjectFieldNode $node) {
211 211
                         return $node->name . ': ' . $node->value;
212 212
                     },
213 213
 
214
-                    NodeKind::DIRECTIVE => function (DirectiveNode $node) {
214
+                    NodeKind::DIRECTIVE => function(DirectiveNode $node) {
215 215
                         return '@' . $node->name . $this->wrap('(', $this->join($node->arguments, ', '), ')');
216 216
                     },
217 217
 
218
-                    NodeKind::NAMED_TYPE => function (NamedTypeNode $node) {
218
+                    NodeKind::NAMED_TYPE => function(NamedTypeNode $node) {
219 219
                         return $node->name;
220 220
                     },
221 221
 
222
-                    NodeKind::LIST_TYPE => function (ListTypeNode $node) {
222
+                    NodeKind::LIST_TYPE => function(ListTypeNode $node) {
223 223
                         return '[' . $node->type . ']';
224 224
                     },
225 225
 
226
-                    NodeKind::NON_NULL_TYPE => function (NonNullTypeNode $node) {
226
+                    NodeKind::NON_NULL_TYPE => function(NonNullTypeNode $node) {
227 227
                         return $node->type . '!';
228 228
                     },
229 229
 
230
-                    NodeKind::SCHEMA_DEFINITION => function (SchemaDefinitionNode $def) {
230
+                    NodeKind::SCHEMA_DEFINITION => function(SchemaDefinitionNode $def) {
231 231
                         return $this->join(
232 232
                             [
233 233
                                 'schema',
@@ -238,15 +238,15 @@  discard block
 block discarded – undo
238 238
                         );
239 239
                     },
240 240
 
241
-                    NodeKind::OPERATION_TYPE_DEFINITION => function (OperationTypeDefinitionNode $def) {
241
+                    NodeKind::OPERATION_TYPE_DEFINITION => function(OperationTypeDefinitionNode $def) {
242 242
                         return $def->operation . ': ' . $def->type;
243 243
                     },
244 244
 
245
-                    NodeKind::SCALAR_TYPE_DEFINITION => $this->addDescription(function (ScalarTypeDefinitionNode $def) {
245
+                    NodeKind::SCALAR_TYPE_DEFINITION => $this->addDescription(function(ScalarTypeDefinitionNode $def) {
246 246
                         return $this->join(['scalar', $def->name, $this->join($def->directives, ' ')], ' ');
247 247
                     }),
248 248
 
249
-                    NodeKind::OBJECT_TYPE_DEFINITION => $this->addDescription(function (ObjectTypeDefinitionNode $def) {
249
+                    NodeKind::OBJECT_TYPE_DEFINITION => $this->addDescription(function(ObjectTypeDefinitionNode $def) {
250 250
                         return $this->join(
251 251
                             [
252 252
                                 'type',
@@ -259,14 +259,14 @@  discard block
 block discarded – undo
259 259
                         );
260 260
                     }),
261 261
 
262
-                    NodeKind::FIELD_DEFINITION => $this->addDescription(function (FieldDefinitionNode $def) {
262
+                    NodeKind::FIELD_DEFINITION => $this->addDescription(function(FieldDefinitionNode $def) {
263 263
                         return $def->name
264 264
                             . $this->wrap('(', $this->join($def->arguments, ', '), ')')
265 265
                             . ': ' . $def->type
266 266
                             . $this->wrap(' ', $this->join($def->directives, ' '));
267 267
                     }),
268 268
 
269
-                    NodeKind::INPUT_VALUE_DEFINITION => $this->addDescription(function (InputValueDefinitionNode $def) {
269
+                    NodeKind::INPUT_VALUE_DEFINITION => $this->addDescription(function(InputValueDefinitionNode $def) {
270 270
                         return $this->join(
271 271
                             [
272 272
                                 $def->name . ': ' . $def->type,
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
                     }),
279 279
 
280 280
                     NodeKind::INTERFACE_TYPE_DEFINITION => $this->addDescription(
281
-                        function (InterfaceTypeDefinitionNode $def) {
281
+                        function(InterfaceTypeDefinitionNode $def) {
282 282
                             return $this->join(
283 283
                                 [
284 284
                                     'interface',
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                         }
292 292
                     ),
293 293
 
294
-                    NodeKind::UNION_TYPE_DEFINITION => $this->addDescription(function (UnionTypeDefinitionNode $def) {
294
+                    NodeKind::UNION_TYPE_DEFINITION => $this->addDescription(function(UnionTypeDefinitionNode $def) {
295 295
                         return $this->join(
296 296
                             [
297 297
                                 'union',
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
                         );
306 306
                     }),
307 307
 
308
-                    NodeKind::ENUM_TYPE_DEFINITION => $this->addDescription(function (EnumTypeDefinitionNode $def) {
308
+                    NodeKind::ENUM_TYPE_DEFINITION => $this->addDescription(function(EnumTypeDefinitionNode $def) {
309 309
                         return $this->join(
310 310
                             [
311 311
                                 'enum',
@@ -317,11 +317,11 @@  discard block
 block discarded – undo
317 317
                         );
318 318
                     }),
319 319
 
320
-                    NodeKind::ENUM_VALUE_DEFINITION => $this->addDescription(function (EnumValueDefinitionNode $def) {
320
+                    NodeKind::ENUM_VALUE_DEFINITION => $this->addDescription(function(EnumValueDefinitionNode $def) {
321 321
                         return $this->join([$def->name, $this->join($def->directives, ' ')], ' ');
322 322
                     }),
323 323
 
324
-                    NodeKind::INPUT_OBJECT_TYPE_DEFINITION => $this->addDescription(function (
324
+                    NodeKind::INPUT_OBJECT_TYPE_DEFINITION => $this->addDescription(function(
325 325
                         InputObjectTypeDefinitionNode $def
326 326
                     ) {
327 327
                         return $this->join(
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
                         );
336 336
                     }),
337 337
 
338
-                    NodeKind::SCALAR_TYPE_EXTENSION => function (ScalarTypeExtensionNode $def) {
338
+                    NodeKind::SCALAR_TYPE_EXTENSION => function(ScalarTypeExtensionNode $def) {
339 339
                         return $this->join(
340 340
                             [
341 341
                                 'extend scalar',
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
                         );
347 347
                     },
348 348
 
349
-                    NodeKind::OBJECT_TYPE_EXTENSION => function (ObjectTypeExtensionNode $def) {
349
+                    NodeKind::OBJECT_TYPE_EXTENSION => function(ObjectTypeExtensionNode $def) {
350 350
                         return $this->join(
351 351
                             [
352 352
                                 'extend type',
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
                         );
360 360
                     },
361 361
 
362
-                    NodeKind::INTERFACE_TYPE_EXTENSION => function (InterfaceTypeExtensionNode $def) {
362
+                    NodeKind::INTERFACE_TYPE_EXTENSION => function(InterfaceTypeExtensionNode $def) {
363 363
                         return $this->join(
364 364
                             [
365 365
                                 'extend interface',
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
                         );
372 372
                     },
373 373
 
374
-                    NodeKind::UNION_TYPE_EXTENSION => function (UnionTypeExtensionNode $def) {
374
+                    NodeKind::UNION_TYPE_EXTENSION => function(UnionTypeExtensionNode $def) {
375 375
                         return $this->join(
376 376
                             [
377 377
                                 'extend union',
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
                         );
386 386
                     },
387 387
 
388
-                    NodeKind::ENUM_TYPE_EXTENSION => function (EnumTypeExtensionNode $def) {
388
+                    NodeKind::ENUM_TYPE_EXTENSION => function(EnumTypeExtensionNode $def) {
389 389
                         return $this->join(
390 390
                             [
391 391
                                 'extend enum',
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
                         );
398 398
                     },
399 399
 
400
-                    NodeKind::INPUT_OBJECT_TYPE_EXTENSION => function (InputObjectTypeExtensionNode $def) {
400
+                    NodeKind::INPUT_OBJECT_TYPE_EXTENSION => function(InputObjectTypeExtensionNode $def) {
401 401
                         return $this->join(
402 402
                             [
403 403
                                 'extend input',
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
                         );
410 410
                     },
411 411
 
412
-                    NodeKind::DIRECTIVE_DEFINITION => $this->addDescription(function (DirectiveDefinitionNode $def) {
412
+                    NodeKind::DIRECTIVE_DEFINITION => $this->addDescription(function(DirectiveDefinitionNode $def) {
413 413
                         return 'directive @'
414 414
                             . $def->name
415 415
                             . $this->wrap('(', $this->join($def->arguments, ', '), ')')
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 
423 423
     public function addDescription(\Closure $cb)
424 424
     {
425
-        return function ($node) use ($cb) {
425
+        return function($node) use ($cb) {
426 426
             return $this->join([$node->description, $cb($node)], "\n");
427 427
         };
428 428
     }
@@ -469,8 +469,8 @@  discard block
 block discarded – undo
469 469
                 $separator,
470 470
                 Utils::filter(
471 471
                     $maybeArray,
472
-                    function ($x) {
473
-                        return ! ! $x;
472
+                    function($x) {
473
+                        return !!$x;
474 474
                     }
475 475
                 )
476 476
             )
Please login to merge, or discard this patch.
src/Language/Parser.php 1 patch
Spacing   +22 added lines, -24 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         $this->expect($openKind);
300 300
 
301 301
         $nodes = [];
302
-        while (! $this->skip($closeKind)) {
302
+        while (!$this->skip($closeKind)) {
303 303
             $nodes[] = $parseFn($this);
304 304
         }
305 305
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
         $this->expect($openKind);
324 324
 
325 325
         $nodes = [$parseFn($this)];
326
-        while (! $this->skip($closeKind)) {
326
+        while (!$this->skip($closeKind)) {
327 327
             $nodes[] = $parseFn($this);
328 328
         }
329 329
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
         $definitions = [];
361 361
         do {
362 362
             $definitions[] = $this->parseDefinition();
363
-        } while (! $this->skip(Token::EOF));
363
+        } while (!$this->skip(Token::EOF));
364 364
 
365 365
         return new DocumentNode([
366 366
             'definitions' => new NodeList($definitions),
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         return $this->peek(Token::PAREN_L) ?
493 493
             $this->many(
494 494
                 Token::PAREN_L,
495
-                function () {
495
+                function() {
496 496
                     return $this->parseVariableDefinition();
497 497
                 },
498 498
                 Token::PAREN_R
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
             [
548 548
                 'selections' => $this->many(
549 549
                     Token::BRACE_L,
550
-                    function () {
550
+                    function() {
551 551
                         return $this->parseSelection();
552 552
                     },
553 553
                     Token::BRACE_R
@@ -568,8 +568,7 @@  discard block
 block discarded – undo
568 568
     private function parseSelection()
569 569
     {
570 570
         return $this->peek(Token::SPREAD) ?
571
-            $this->parseFragment() :
572
-            $this->parseField();
571
+            $this->parseFragment() : $this->parseField();
573 572
     }
574 573
 
575 574
     /**
@@ -607,16 +606,15 @@  discard block
 block discarded – undo
607 606
     private function parseArguments($isConst)
608 607
     {
609 608
         $parseFn = $isConst ?
610
-            function () {
609
+            function() {
611 610
                 return $this->parseConstArgument();
612 611
             } :
613
-            function () {
612
+            function() {
614 613
                 return $this->parseArgument();
615 614
             };
616 615
 
617 616
         return $this->peek(Token::PAREN_L) ?
618
-            $this->many(Token::PAREN_L, $parseFn, Token::PAREN_R) :
619
-            new NodeList([]);
617
+            $this->many(Token::PAREN_L, $parseFn, Token::PAREN_R) : new NodeList([]);
620 618
     }
621 619
 
622 620
     /**
@@ -808,7 +806,7 @@  discard block
 block discarded – undo
808 806
                 break;
809 807
 
810 808
             case Token::DOLLAR:
811
-                if (! $isConst) {
809
+                if (!$isConst) {
812 810
                     return $this->parseVariable();
813 811
                 }
814 812
                 break;
@@ -855,9 +853,9 @@  discard block
 block discarded – undo
855 853
     private function parseArray($isConst)
856 854
     {
857 855
         $start   = $this->lexer->token;
858
-        $parseFn = $isConst ? function () {
856
+        $parseFn = $isConst ? function() {
859 857
             return $this->parseConstValue();
860
-        } : function () {
858
+        } : function() {
861 859
             return $this->parseVariableValue();
862 860
         };
863 861
 
@@ -878,7 +876,7 @@  discard block
 block discarded – undo
878 876
         $start = $this->lexer->token;
879 877
         $this->expect(Token::BRACE_L);
880 878
         $fields = [];
881
-        while (! $this->skip(Token::BRACE_R)) {
879
+        while (!$this->skip(Token::BRACE_R)) {
882 880
             $fields[] = $this->parseObjectField($isConst);
883 881
         }
884 882
 
@@ -1065,7 +1063,7 @@  discard block
 block discarded – undo
1065 1063
 
1066 1064
         $operationTypes = $this->many(
1067 1065
             Token::BRACE_L,
1068
-            function () {
1066
+            function() {
1069 1067
                 return $this->parseOperationTypeDefinition();
1070 1068
             },
1071 1069
             Token::BRACE_R
@@ -1158,7 +1156,7 @@  discard block
 block discarded – undo
1158 1156
                 $types[] = $this->parseNamedType();
1159 1157
             } while ($this->skip(Token::AMP) ||
1160 1158
             // Legacy support for the SDL?
1161
-            (! empty($this->lexer->options['allowLegacySDLImplementsInterfaces']) && $this->peek(Token::NAME))
1159
+            (!empty($this->lexer->options['allowLegacySDLImplementsInterfaces']) && $this->peek(Token::NAME))
1162 1160
             );
1163 1161
         }
1164 1162
 
@@ -1172,7 +1170,7 @@  discard block
 block discarded – undo
1172 1170
     private function parseFieldsDefinition()
1173 1171
     {
1174 1172
         // Legacy support for the SDL?
1175
-        if (! empty($this->lexer->options['allowLegacySDLEmptyFields']) &&
1173
+        if (!empty($this->lexer->options['allowLegacySDLEmptyFields']) &&
1176 1174
             $this->peek(Token::BRACE_L) &&
1177 1175
             $this->lexer->lookahead()->kind === Token::BRACE_R
1178 1176
         ) {
@@ -1185,7 +1183,7 @@  discard block
 block discarded – undo
1185 1183
         return $this->peek(Token::BRACE_L)
1186 1184
             ? $this->many(
1187 1185
                 Token::BRACE_L,
1188
-                function () {
1186
+                function() {
1189 1187
                     return $this->parseFieldDefinition();
1190 1188
                 },
1191 1189
                 Token::BRACE_R
@@ -1223,13 +1221,13 @@  discard block
 block discarded – undo
1223 1221
      */
1224 1222
     private function parseArgumentDefs()
1225 1223
     {
1226
-        if (! $this->peek(Token::PAREN_L)) {
1224
+        if (!$this->peek(Token::PAREN_L)) {
1227 1225
             return new NodeList([]);
1228 1226
         }
1229 1227
 
1230 1228
         return $this->many(
1231 1229
             Token::PAREN_L,
1232
-            function () {
1230
+            function() {
1233 1231
                 return $this->parseInputValueDef();
1234 1232
             },
1235 1233
             Token::PAREN_R
@@ -1362,7 +1360,7 @@  discard block
 block discarded – undo
1362 1360
         return $this->peek(Token::BRACE_L)
1363 1361
             ? $this->many(
1364 1362
                 Token::BRACE_L,
1365
-                function () {
1363
+                function() {
1366 1364
                     return $this->parseEnumValueDefinition();
1367 1365
                 },
1368 1366
                 Token::BRACE_R
@@ -1420,7 +1418,7 @@  discard block
 block discarded – undo
1420 1418
         return $this->peek(Token::BRACE_L)
1421 1419
             ? $this->many(
1422 1420
                 Token::BRACE_L,
1423
-                function () {
1421
+                function() {
1424 1422
                     return $this->parseInputValueDef();
1425 1423
                 },
1426 1424
                 Token::BRACE_R
@@ -1559,7 +1557,7 @@  discard block
 block discarded – undo
1559 1557
         $directives = $this->parseDirectives(true);
1560 1558
         $types      = $this->parseUnionMemberTypes();
1561 1559
         if (count($directives) === 0 &&
1562
-            ! $types
1560
+            !$types
1563 1561
         ) {
1564 1562
             throw $this->unexpected();
1565 1563
         }
Please login to merge, or discard this patch.
src/Language/Visitor.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             $isEdited  = $isLeaving && count($edits) !== 0;
202 202
 
203 203
             if ($isLeaving) {
204
-                $key    = ! $ancestors ? $UNDEFINED : $path[count($path) - 1];
204
+                $key    = !$ancestors ? $UNDEFINED : $path[count($path) - 1];
205 205
                 $node   = $parent;
206 206
                 $parent = array_pop($ancestors);
207 207
 
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
             }
256 256
 
257 257
             $result = null;
258
-            if (! $node instanceof NodeList && ! is_array($node)) {
259
-                if (! ($node instanceof Node)) {
258
+            if (!$node instanceof NodeList && !is_array($node)) {
259
+                if (!($node instanceof Node)) {
260 260
                     throw new \Exception('Invalid AST Node: ' . json_encode($node));
261 261
                 }
262 262
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                             if ($result->doBreak) {
271 271
                                 break;
272 272
                             }
273
-                            if (! $isLeaving && $result->doContinue) {
273
+                            if (!$isLeaving && $result->doContinue) {
274 274
                                 array_pop($path);
275 275
                                 continue;
276 276
                             }
@@ -282,8 +282,8 @@  discard block
 block discarded – undo
282 282
                         }
283 283
 
284 284
                         $edits[] = [$key, $editValue];
285
-                        if (! $isLeaving) {
286
-                            if (! ($editValue instanceof Node)) {
285
+                        if (!$isLeaving) {
286
+                            if (!($editValue instanceof Node)) {
287 287
                                 array_pop($path);
288 288
                                 continue;
289 289
                             }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             if ($isLeaving) {
302 302
                 array_pop($path);
303 303
             } else {
304
-                $stack   = [
304
+                $stack = [
305 305
                     'inArray' => $inArray,
306 306
                     'index'   => $index,
307 307
                     'keys'    => $keys,
@@ -379,9 +379,9 @@  discard block
 block discarded – undo
379 379
         $skipping      = new \SplFixedArray($visitorsCount);
380 380
 
381 381
         return [
382
-            'enter' => function (Node $node) use ($visitors, $skipping, $visitorsCount) {
382
+            'enter' => function(Node $node) use ($visitors, $skipping, $visitorsCount) {
383 383
                 for ($i = 0; $i < $visitorsCount; $i++) {
384
-                    if (! empty($skipping[$i])) {
384
+                    if (!empty($skipping[$i])) {
385 385
                         continue;
386 386
                     }
387 387
 
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
                         false
392 392
                     );
393 393
 
394
-                    if (! $fn) {
394
+                    if (!$fn) {
395 395
                         continue;
396 396
                     }
397 397
 
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
                     }
411 411
                 }
412 412
             },
413
-            'leave' => function (Node $node) use ($visitors, $skipping, $visitorsCount) {
413
+            'leave' => function(Node $node) use ($visitors, $skipping, $visitorsCount) {
414 414
                 for ($i = 0; $i < $visitorsCount; $i++) {
415 415
                     if (empty($skipping[$i])) {
416 416
                         $fn = self::getVisitFn(
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
     public static function visitWithTypeInfo(TypeInfo $typeInfo, $visitor)
447 447
     {
448 448
         return [
449
-            'enter' => function (Node $node) use ($typeInfo, $visitor) {
449
+            'enter' => function(Node $node) use ($typeInfo, $visitor) {
450 450
                 $typeInfo->enter($node);
451 451
                 $fn = self::getVisitFn($visitor, $node->kind, false);
452 452
 
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 
465 465
                 return null;
466 466
             },
467
-            'leave' => function (Node $node) use ($typeInfo, $visitor) {
467
+            'leave' => function(Node $node) use ($typeInfo, $visitor) {
468 468
                 $fn     = self::getVisitFn($visitor, $node->kind, true);
469 469
                 $result = $fn ? call_user_func_array($fn, func_get_args()) : null;
470 470
                 $typeInfo->leave($node);
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 
489 489
         $kindVisitor = $visitor[$kind] ?? null;
490 490
 
491
-        if (! $isLeaving && is_callable($kindVisitor)) {
491
+        if (!$isLeaving && is_callable($kindVisitor)) {
492 492
             // { Kind() {} }
493 493
             return $kindVisitor;
494 494
         }
Please login to merge, or discard this patch.
src/Validator/ValidationContext.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $usages = $this->recursiveVariableUsages[$operation] ?? null;
100 100
 
101
-        if (! $usages) {
101
+        if (!$usages) {
102 102
             $usages    = $this->getVariableUsages($operation);
103 103
             $fragments = $this->getRecursivelyReferencedFragments($operation);
104 104
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $usages = $this->variableUsages[$node] ?? null;
122 122
 
123
-        if (! $usages) {
123
+        if (!$usages) {
124 124
             $newUsages = [];
125 125
             $typeInfo  = new TypeInfo($this->schema);
126 126
             Visitor::visit(
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
                 Visitor::visitWithTypeInfo(
129 129
                     $typeInfo,
130 130
                     [
131
-                        NodeKind::VARIABLE_DEFINITION => function () {
131
+                        NodeKind::VARIABLE_DEFINITION => function() {
132 132
                             return false;
133 133
                         },
134
-                        NodeKind::VARIABLE            => function (VariableNode $variable) use (
134
+                        NodeKind::VARIABLE            => function(VariableNode $variable) use (
135 135
                             &$newUsages,
136 136
                             $typeInfo
137 137
                         ) {
@@ -154,23 +154,23 @@  discard block
 block discarded – undo
154 154
     {
155 155
         $fragments = $this->recursivelyReferencedFragments[$operation] ?? null;
156 156
 
157
-        if (! $fragments) {
157
+        if (!$fragments) {
158 158
             $fragments      = [];
159 159
             $collectedNames = [];
160 160
             $nodesToVisit   = [$operation];
161
-            while (! empty($nodesToVisit)) {
161
+            while (!empty($nodesToVisit)) {
162 162
                 $node    = array_pop($nodesToVisit);
163 163
                 $spreads = $this->getFragmentSpreads($node);
164 164
                 for ($i = 0; $i < count($spreads); $i++) {
165 165
                     $fragName = $spreads[$i]->name->value;
166 166
 
167
-                    if (! empty($collectedNames[$fragName])) {
167
+                    if (!empty($collectedNames[$fragName])) {
168 168
                         continue;
169 169
                     }
170 170
 
171 171
                     $collectedNames[$fragName] = true;
172 172
                     $fragment                  = $this->getFragment($fragName);
173
-                    if (! $fragment) {
173
+                    if (!$fragment) {
174 174
                         continue;
175 175
                     }
176 176
 
@@ -190,11 +190,11 @@  discard block
 block discarded – undo
190 190
     public function getFragmentSpreads(HasSelectionSet $node)
191 191
     {
192 192
         $spreads = $this->fragmentSpreads[$node] ?? null;
193
-        if (! $spreads) {
193
+        if (!$spreads) {
194 194
             $spreads     = [];
195 195
             /** @var SelectionSetNode[] $setsToVisit */
196 196
             $setsToVisit = [$node->selectionSet];
197
-            while (! empty($setsToVisit)) {
197
+            while (!empty($setsToVisit)) {
198 198
                 $set = array_pop($setsToVisit);
199 199
 
200 200
                 for ($i = 0; $i < count($set->selections); $i++) {
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     public function getFragment($name)
220 220
     {
221 221
         $fragments = $this->fragments;
222
-        if (! $fragments) {
222
+        if (!$fragments) {
223 223
             $fragments = [];
224 224
             foreach ($this->getDocument()->definitions as $statement) {
225 225
                 if ($statement->kind !== NodeKind::FRAGMENT_DEFINITION) {
Please login to merge, or discard this patch.
src/Validator/Rules/KnownArgumentNames.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function getVisitor(ValidationContext $context)
27 27
     {
28 28
         return [
29
-            NodeKind::ARGUMENT => function (ArgumentNode $node, $key, $parent, $path, $ancestors) use ($context) {
29
+            NodeKind::ARGUMENT => function(ArgumentNode $node, $key, $parent, $path, $ancestors) use ($context) {
30 30
                 /** @var NodeList|Node[] $ancestors */
31 31
                 $argDef = $context->getArgument();
32 32
                 if ($argDef !== null) {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                                 Utils::suggestionList(
47 47
                                     $node->name->value,
48 48
                                     array_map(
49
-                                        function ($arg) {
49
+                                        function($arg) {
50 50
                                             return $arg->name;
51 51
                                         },
52 52
                                         $fieldDef->args
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                                 Utils::suggestionList(
67 67
                                     $node->name->value,
68 68
                                     array_map(
69
-                                        function ($arg) {
69
+                                        function($arg) {
70 70
                                             return $arg->name;
71 71
                                         },
72 72
                                         $directive->args
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public static function unknownArgMessage($argName, $fieldName, $typeName, array $suggestedArgs)
88 88
     {
89 89
         $message = sprintf('Unknown argument "%s" on field "%s" of type "%s".', $argName, $fieldName, $typeName);
90
-        if (! empty($suggestedArgs)) {
90
+        if (!empty($suggestedArgs)) {
91 91
             $message .= sprintf(' Did you mean %s?', Utils::quotedOrList($suggestedArgs));
92 92
         }
93 93
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public static function unknownDirectiveArgMessage($argName, $directiveName, array $suggestedArgs)
101 101
     {
102 102
         $message = sprintf('Unknown argument "%s" on directive "@%s".', $argName, $directiveName);
103
-        if (! empty($suggestedArgs)) {
103
+        if (!empty($suggestedArgs)) {
104 104
             $message .= sprintf(' Did you mean %s?', Utils::quotedOrList($suggestedArgs));
105 105
         }
106 106
 
Please login to merge, or discard this patch.
src/Validator/Rules/LoneAnonymousOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,17 +26,17 @@
 block discarded – undo
26 26
         $operationCount = 0;
27 27
 
28 28
         return [
29
-            NodeKind::DOCUMENT             => function (DocumentNode $node) use (&$operationCount) {
29
+            NodeKind::DOCUMENT             => function(DocumentNode $node) use (&$operationCount) {
30 30
                 $tmp = Utils::filter(
31 31
                     $node->definitions,
32
-                    function (Node $definition) {
32
+                    function(Node $definition) {
33 33
                         return $definition->kind === NodeKind::OPERATION_DEFINITION;
34 34
                     }
35 35
                 );
36 36
 
37 37
                 $operationCount = count($tmp);
38 38
             },
39
-            NodeKind::OPERATION_DEFINITION => function (OperationDefinitionNode $node) use (
39
+            NodeKind::OPERATION_DEFINITION => function(OperationDefinitionNode $node) use (
40 40
                 &$operationCount,
41 41
                 $context
42 42
             ) {
Please login to merge, or discard this patch.