Passed
Pull Request — master (#204)
by Quang
03:01
created
src/Language/Node/DirectivesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function getDirectivesAsArray(): array
32 32
     {
33
-        return \array_map(function (DirectiveNode $directive) {
33
+        return \array_map(function(DirectiveNode $directive) {
34 34
             return $directive->toArray();
35 35
         }, $this->directives);
36 36
     }
Please login to merge, or discard this patch.
src/Language/Parser.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         /**
322 322
          * @return TypeNodeInterface
323 323
          */
324
-        $parseType = function (): TypeNodeInterface {
324
+        $parseType = function(): TypeNodeInterface {
325 325
             $this->expect(TokenKindEnum::COLON);
326 326
             return $this->parseTypeReference();
327 327
         };
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
         /**
433 433
          * @return ArgumentNode
434 434
          */
435
-        $parseFunction = function () use ($isConst): ArgumentNode {
435
+        $parseFunction = function() use ($isConst) : ArgumentNode {
436 436
             return $this->parseArgument($isConst);
437 437
         };
438 438
 
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
         /**
460 460
          * @return NodeInterface|TypeNodeInterface|ValueNodeInterface
461 461
          */
462
-        $parseValue = function () use ($isConst): NodeInterface {
462
+        $parseValue = function() use ($isConst): NodeInterface {
463 463
             $this->expect(TokenKindEnum::COLON);
464 464
             return $this->parseValueLiteral($isConst);
465 465
         };
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
 
529 529
         $this->expectKeyword(KeywordEnum::FRAGMENT);
530 530
 
531
-        $parseTypeCondition = function () {
531
+        $parseTypeCondition = function() {
532 532
             $this->expectKeyword(KeywordEnum::ON);
533 533
             return $this->parseNamedType();
534 534
         };
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
     {
658 658
         $start = $this->lexer->getToken();
659 659
 
660
-        $parseFunction = function () use ($isConst) {
660
+        $parseFunction = function() use ($isConst) {
661 661
             return $this->parseValueLiteral($isConst);
662 662
         };
663 663
 
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
          * @param bool $isConst
711 711
          * @return NodeInterface|TypeNodeInterface|ValueNodeInterface
712 712
          */
713
-        $parseValue = function (bool $isConst): NodeInterface {
713
+        $parseValue = function(bool $isConst): NodeInterface {
714 714
             $this->expect(TokenKindEnum::COLON);
715 715
             return $this->parseValueLiteral($isConst);
716 716
         };
@@ -1053,7 +1053,7 @@  discard block
 block discarded – undo
1053 1053
      */
1054 1054
     protected function parseArgumentsDefinition(): array
1055 1055
     {
1056
-        $parseFunction = function (): InputValueDefinitionNode {
1056
+        $parseFunction = function(): InputValueDefinitionNode {
1057 1057
             return $this->parseInputValueDefinition();
1058 1058
         };
1059 1059
 
@@ -1259,7 +1259,7 @@  discard block
 block discarded – undo
1259 1259
      */
1260 1260
     protected function parseInputFieldsDefinition(): array
1261 1261
     {
1262
-        $parseFunction = function (): InputValueDefinitionNode {
1262
+        $parseFunction = function(): InputValueDefinitionNode {
1263 1263
             return $this->parseInputValueDefinition();
1264 1264
         };
1265 1265
 
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
 
1564 1564
         $name = $this->parseName();
1565 1565
 
1566
-        if (arraySome(DirectiveLocationEnum::values(), function ($value) use ($name) {
1566
+        if (arraySome(DirectiveLocationEnum::values(), function($value) use ($name) {
1567 1567
             return $name->getValue() === $value;
1568 1568
         })) {
1569 1569
             return $name;
Please login to merge, or discard this patch.
src/Execution/Executor.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         if ($isContainsPromise) {
252 252
             $keys    = array_keys($finalResults);
253 253
             $promise = \React\Promise\all(array_values($finalResults));
254
-            $promise->then(function ($values) use ($keys, &$finalResults) {
254
+            $promise->then(function($values) use ($keys, &$finalResults) {
255 255
                 foreach ($values as $i => $value) {
256 256
                     $finalResults[$keys[$i]] = $value;
257 257
                 }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
         $promise = new \React\Promise\FulfilledPromise([]);
287 287
 
288
-        $resolve = function ($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) {
288
+        $resolve = function($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) {
289 289
             $fieldPath   = $path;
290 290
             $fieldPath[] = $fieldName;
291 291
             try {
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
             if ($this->isPromise($result)) {
298 298
                 /** @var ExtendedPromiseInterface $result */
299
-                return $result->then(function ($resolvedResult) use ($fieldName, $results) {
299
+                return $result->then(function($resolvedResult) use ($fieldName, $results) {
300 300
                     $results[$fieldName] = $resolvedResult;
301 301
                     return $results;
302 302
                 });
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
         };
309 309
 
310 310
         foreach ($fields as $fieldName => $fieldNodes) {
311
-            $promise = $promise->then(function ($resolvedResults) use (
311
+            $promise = $promise->then(function($resolvedResults) use (
312 312
                 $resolve,
313 313
                 $fieldName,
314 314
                 $path,
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
             });
321 321
         }
322 322
 
323
-        $promise->then(function ($resolvedResults) use (&$finalResults) {
323
+        $promise->then(function($resolvedResults) use (&$finalResults) {
324 324
             $finalResults = $resolvedResults ?? [];
325 325
         });
326 326
 
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             if ($this->isPromise($completed)) {
505 505
                 $context = $this->context;
506 506
                 /** @var ExtendedPromiseInterface $completed */
507
-                return $completed->then(null, function ($error) use ($context, $fieldNodes, $path) {
507
+                return $completed->then(null, function($error) use ($context, $fieldNodes, $path) {
508 508
                     //@TODO Handle $error better
509 509
                     if ($error instanceof \Exception) {
510 510
                         $context->addError($this->buildLocatedError($error, $fieldNodes, $path));
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
     ) {
580 580
         if ($this->isPromise($result)) {
581 581
             /** @var ExtendedPromiseInterface $result */
582
-            return $result->then(function (&$value) use ($returnType, $fieldNodes, $info, $path) {
582
+            return $result->then(function(&$value) use ($returnType, $fieldNodes, $info, $path) {
583 583
                 return $this->completeValue($returnType, $fieldNodes, $info, $path, $value);
584 584
             });
585 585
         }
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 
668 668
         if ($this->isPromise($runtimeType)) {
669 669
             /** @var ExtendedPromiseInterface $runtimeType */
670
-            return $runtimeType->then(function ($resolvedRuntimeType) use (
670
+            return $runtimeType->then(function($resolvedRuntimeType) use (
671 671
                 $returnType,
672 672
                 $fieldNodes,
673 673
                 $info,
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
 
793 793
         if (!empty($promisedIsTypeOfResults)) {
794 794
             return \React\Promise\all($promisedIsTypeOfResults)
795
-                ->then(function ($isTypeOfResults) use ($possibleTypes) {
795
+                ->then(function($isTypeOfResults) use ($possibleTypes) {
796 796
                     foreach ($isTypeOfResults as $index => $result) {
797 797
                         if ($result) {
798 798
                             return $possibleTypes[$index];
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
@@ -578,7 +578,7 @@
 block discarded – undo
578 578
             if ($this->isEscapedTripleQuote($code)) {
579 579
                 $rawValue       .= sliceString($this->body, $chunkStart, $this->position) . '"""';
580 580
                 $this->position += 4;
581
-                $chunkStart     = $this->position;
581
+                $chunkStart = $this->position;
582 582
             } else {
583 583
                 ++$this->position;
584 584
             }
Please login to merge, or discard this patch.
src/Type/directives.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 {
51 51
     return arraySome(
52 52
         specifiedDirectives(),
53
-        function (Directive $specifiedDirective) use ($directive) {
53
+        function(Directive $specifiedDirective) use ($directive) {
54 54
             return $specifiedDirective->getName() === $directive->getName();
55 55
         }
56 56
     );
Please login to merge, or discard this patch.
src/Type/IntrospectionProvider.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     protected function registerIntrospectionTypes()
59 59
     {
60
-        $this->container->add(GraphQL::SCHEMA_INTROSPECTION, function () {
60
+        $this->container->add(GraphQL::SCHEMA_INTROSPECTION, function() {
61 61
             return newObjectType([
62 62
                 'name'            => GraphQL::SCHEMA_INTROSPECTION,
63 63
                 'isIntrospection' => true,
@@ -65,19 +65,19 @@  discard block
 block discarded – undo
65 65
                     'A GraphQL Schema defines the capabilities of a GraphQL server. It ' .
66 66
                     'exposes all available types and directives on the server, as well as ' .
67 67
                     'the entry points for query, mutation, and subscription operations.',
68
-                'fields'          => function () {
68
+                'fields'          => function() {
69 69
                     return [
70 70
                         'types'            => [
71 71
                             'description' => 'A list of all types supported by this server.',
72 72
                             'type'        => newNonNull(newList(newNonNull(__Type()))),
73
-                            'resolve'     => function (SchemaInterface $schema): array {
73
+                            'resolve'     => function(SchemaInterface $schema): array {
74 74
                                 return array_values($schema->getTypeMap());
75 75
                             },
76 76
                         ],
77 77
                         'queryType'        => [
78 78
                             'description' => 'The type that query operations will be rooted at.',
79 79
                             'type'        => newNonNull(__Type()),
80
-                            'resolve'     => function (SchemaInterface $schema): ?TypeInterface {
80
+                            'resolve'     => function(SchemaInterface $schema): ?TypeInterface {
81 81
                                 return $schema->getQueryType();
82 82
                             },
83 83
                         ],
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                                 'If this server supports mutation, the type that ' .
87 87
                                 'mutation operations will be rooted at.',
88 88
                             'type'        => __Type(),
89
-                            'resolve'     => function (SchemaInterface $schema): ?TypeInterface {
89
+                            'resolve'     => function(SchemaInterface $schema): ?TypeInterface {
90 90
                                 return $schema->getMutationType();
91 91
                             },
92 92
                         ],
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
                                 'If this server support subscription, the type that ' .
96 96
                                 'subscription operations will be rooted at.',
97 97
                             'type'        => __Type(),
98
-                            'resolve'     => function (SchemaInterface $schema): ?TypeInterface {
98
+                            'resolve'     => function(SchemaInterface $schema): ?TypeInterface {
99 99
                                 return $schema->getSubscriptionType();
100 100
                             },
101 101
                         ],
102 102
                         'directives'       => [
103 103
                             'description' => 'A list of all directives supported by this server.',
104 104
                             'type'        => newNonNull(newList(newNonNull(__Directive()))),
105
-                            'resolve'     => function (SchemaInterface $schema): array {
105
+                            'resolve'     => function(SchemaInterface $schema): array {
106 106
                                 return $schema->getDirectives();
107 107
                             },
108 108
                         ],
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             ]);
112 112
         }, true/* $shared */);
113 113
 
114
-        $this->container->add(GraphQL::DIRECTIVE_INTROSPECTION, function () {
114
+        $this->container->add(GraphQL::DIRECTIVE_INTROSPECTION, function() {
115 115
             return newObjectType([
116 116
                 'name'            => GraphQL::DIRECTIVE_INTROSPECTION,
117 117
                 'isIntrospection' => true,
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                     'execution behavior in ways field arguments will not suffice, such as ' .
123 123
                     'conditionally including or skipping a field. Directives provide this by ' .
124 124
                     'describing additional information to the executor.',
125
-                'fields'          => function () {
125
+                'fields'          => function() {
126 126
                     return [
127 127
                         'name'        => ['type' => newNonNull(String())],
128 128
                         'description' => ['type' => String()],
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                         ],
132 132
                         'args'        => [
133 133
                             'type'    => newNonNull(newList(newNonNull(__InputValue()))),
134
-                            'resolve' => function (Directive $directive): array {
134
+                            'resolve' => function(Directive $directive): array {
135 135
                                 return $directive->getArguments() ?: [];
136 136
                             },
137 137
                         ],
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             ]);
141 141
         }, true/* $shared */);
142 142
 
143
-        $this->container->add(GraphQL::DIRECTIVE_LOCATION_INTROSPECTION, function () {
143
+        $this->container->add(GraphQL::DIRECTIVE_LOCATION_INTROSPECTION, function() {
144 144
             return newEnumType([
145 145
                 'name'            => GraphQL::DIRECTIVE_LOCATION_INTROSPECTION,
146 146
                 'isIntrospection' => true,
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             ]);
207 207
         }, true/* $shared */);
208 208
 
209
-        $this->container->add(GraphQL::TYPE_INTROSPECTION, function () {
209
+        $this->container->add(GraphQL::TYPE_INTROSPECTION, function() {
210 210
             return newObjectType([
211 211
                 'name'            => GraphQL::TYPE_INTROSPECTION,
212 212
                 'isIntrospection' => true,
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
                     'Object and Interface types provide the fields they describe. Abstract ' .
220 220
                     'types, Union and Interface, provide the Object types possible ' .
221 221
                     'at runtime. List and NonNull types compose other types.',
222
-                'fields'          => function () {
222
+                'fields'          => function() {
223 223
                     return [
224 224
                         'kind'          => [
225 225
                             'type'    => newNonNull(__TypeKind()),
226
-                            'resolve' => function (TypeInterface $type) {
226
+                            'resolve' => function(TypeInterface $type) {
227 227
                                 if ($type instanceof ScalarType) {
228 228
                                     return TypeKindEnum::SCALAR;
229 229
                                 }
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                             'args'    => [
260 260
                                 'includeDeprecated' => ['type' => Boolean(), 'defaultValue' => false],
261 261
                             ],
262
-                            'resolve' => function (TypeInterface $type, array $args):
262
+                            'resolve' => function(TypeInterface $type, array $args):
263 263
                             ?array {
264 264
                                 ['includeDeprecated' => $includeDeprecated] = $args;
265 265
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
                                     $fields = array_values($type->getFields());
268 268
 
269 269
                                     if (!$includeDeprecated) {
270
-                                        $fields = array_filter($fields, function (Field $field) {
270
+                                        $fields = array_filter($fields, function(Field $field) {
271 271
                                             return !$field->isDeprecated();
272 272
                                         });
273 273
                                     }
@@ -280,13 +280,13 @@  discard block
 block discarded – undo
280 280
                         ],
281 281
                         'interfaces'    => [
282 282
                             'type'    => newList(newNonNull(__Type())),
283
-                            'resolve' => function (TypeInterface $type): ?array {
283
+                            'resolve' => function(TypeInterface $type): ?array {
284 284
                                 return $type instanceof ObjectType ? $type->getInterfaces() : null;
285 285
                             },
286 286
                         ],
287 287
                         'possibleTypes' => [
288 288
                             'type'    => newList(newNonNull(__Type())),
289
-                            'resolve' => function (
289
+                            'resolve' => function(
290 290
                                 TypeInterface $type,
291 291
                                 array $args,
292 292
                                 array $context,
@@ -304,14 +304,14 @@  discard block
 block discarded – undo
304 304
                             'args'    => [
305 305
                                 'includeDeprecated' => ['type' => Boolean(), 'defaultValue' => false],
306 306
                             ],
307
-                            'resolve' => function (TypeInterface $type, array $args): ?array {
307
+                            'resolve' => function(TypeInterface $type, array $args): ?array {
308 308
                                 ['includeDeprecated' => $includeDeprecated] = $args;
309 309
 
310 310
                                 if ($type instanceof EnumType) {
311 311
                                     $values = array_values($type->getValues());
312 312
 
313 313
                                     if (!$includeDeprecated) {
314
-                                        $values = array_filter($values, function (Field $field) {
314
+                                        $values = array_filter($values, function(Field $field) {
315 315
                                             return !$field->isDeprecated();
316 316
                                         });
317 317
                                     }
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
                         ],
325 325
                         'inputFields'   => [
326 326
                             'type'    => newList(newNonNull(__InputValue())),
327
-                            'resolve' => function (TypeInterface $type): ?array {
327
+                            'resolve' => function(TypeInterface $type): ?array {
328 328
                                 return $type instanceof InputObjectType ? $type->getFields() : null;
329 329
                             },
330 330
                         ],
@@ -334,20 +334,20 @@  discard block
 block discarded – undo
334 334
             ]);
335 335
         }, true/* $shared */);
336 336
 
337
-        $this->container->add(GraphQL::FIELD_INTROSPECTION, function () {
337
+        $this->container->add(GraphQL::FIELD_INTROSPECTION, function() {
338 338
             return newObjectType([
339 339
                 'name'            => GraphQL::FIELD_INTROSPECTION,
340 340
                 'isIntrospection' => true,
341 341
                 'description'     =>
342 342
                     'Object and Interface types are described by a list of Fields, each of ' .
343 343
                     'which has a name, potentially a list of arguments, and a return type.',
344
-                'fields'          => function () {
344
+                'fields'          => function() {
345 345
                     return [
346 346
                         'name'              => ['type' => newNonNull(String())],
347 347
                         'description'       => ['type' => String()],
348 348
                         'args'              => [
349 349
                             'type'    => newNonNull(newList(newNonNull(__InputValue()))),
350
-                            'resolve' => function (ArgumentsAwareInterface $directive): array {
350
+                            'resolve' => function(ArgumentsAwareInterface $directive): array {
351 351
                                 return $directive->getArguments() ?? [];
352 352
                             },
353 353
                         ],
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
             ]);
360 360
         }, true/* $shared */);
361 361
 
362
-        $this->container->add(GraphQL::INPUT_VALUE_INTROSPECTION, function () {
362
+        $this->container->add(GraphQL::INPUT_VALUE_INTROSPECTION, function() {
363 363
             return newObjectType([
364 364
                 'name'            => GraphQL::INPUT_VALUE_INTROSPECTION,
365 365
                 'isIntrospection' => true,
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
                     'Arguments provided to Fields or Directives and the input fields of an ' .
368 368
                     'InputObject are represented as Input Values which describe their type ' .
369 369
                     'and optionally a default value.',
370
-                'fields'          => function () {
370
+                'fields'          => function() {
371 371
                     return [
372 372
                         'name'         => ['type' => newNonNull(String())],
373 373
                         'description'  => ['type' => String()],
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                             'description' =>
378 378
                                 'A GraphQL-formatted string representing the default value for this ' .
379 379
                                 'input value.',
380
-                            'resolve'     => function ($inputValue) {
380
+                            'resolve'     => function($inputValue) {
381 381
                                 // TODO: Implement this when we have support for printing AST.
382 382
                                 return null;
383 383
                             }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
             ]);
388 388
         }, true/* $shared */);
389 389
 
390
-        $this->container->add(GraphQL::ENUM_VALUE_INTROSPECTION, function () {
390
+        $this->container->add(GraphQL::ENUM_VALUE_INTROSPECTION, function() {
391 391
             return newObjectType([
392 392
                 'name'            => GraphQL::ENUM_VALUE_INTROSPECTION,
393 393
                 'isIntrospection' => true,
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
                     'One possible value for a given Enum. Enum values are unique values, not ' .
396 396
                     'a placeholder for a string or numeric value. However an Enum value is ' .
397 397
                     'returned in a JSON response as a string.',
398
-                'fields'          => function () {
398
+                'fields'          => function() {
399 399
                     return [
400 400
                         'name'              => ['type' => newNonNull(String())],
401 401
                         'description'       => ['type' => String()],
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
             ]);
407 407
         }, true/* $shared */);
408 408
 
409
-        $this->container->add(GraphQL::TYPE_KIND_INTROSPECTION, function () {
409
+        $this->container->add(GraphQL::TYPE_KIND_INTROSPECTION, function() {
410 410
             return newEnumType([
411 411
                 'name'            => GraphQL::TYPE_KIND_INTROSPECTION,
412 412
                 'isIntrospection' => true,
@@ -446,13 +446,13 @@  discard block
 block discarded – undo
446 446
      */
447 447
     protected function registerMetaFields()
448 448
     {
449
-        $this->container->add(GraphQL::SCHEMA_META_FIELD_DEFINITION, function ($__Schema) {
449
+        $this->container->add(GraphQL::SCHEMA_META_FIELD_DEFINITION, function($__Schema) {
450 450
             return new Field(
451 451
                 '__schema',
452 452
                 'Access the current type schema of this server.',
453 453
                 newNonNull($__Schema),
454 454
                 [],
455
-                function ($source, $args, $context, ResolveInfo $info): SchemaInterface {
455
+                function($source, $args, $context, ResolveInfo $info): SchemaInterface {
456 456
                     return $info->getSchema();
457 457
                 },
458 458
                 null,
@@ -461,13 +461,13 @@  discard block
 block discarded – undo
461 461
         })
462 462
             ->withArgument(GraphQL::SCHEMA_INTROSPECTION);
463 463
 
464
-        $this->container->add(GraphQL::TYPE_META_FIELD_DEFINITION, function ($__Type) {
464
+        $this->container->add(GraphQL::TYPE_META_FIELD_DEFINITION, function($__Type) {
465 465
             return new Field(
466 466
                 '__type',
467 467
                 'Request the type information of a single type.',
468 468
                 $__Type,
469 469
                 ['name' => ['type' => newNonNull(String())]],
470
-                function ($source, $args, $context, ResolveInfo $info): TypeInterface {
470
+                function($source, $args, $context, ResolveInfo $info): TypeInterface {
471 471
                     ['name' => $name] = $args;
472 472
                     $schema = $info->getSchema();
473 473
                     return $schema->getType($name);
@@ -478,13 +478,13 @@  discard block
 block discarded – undo
478 478
         })
479 479
             ->withArgument(GraphQL::TYPE_INTROSPECTION);
480 480
 
481
-        $this->container->add(GraphQL::TYPE_NAME_META_FIELD_DEFINITION, function () {
481
+        $this->container->add(GraphQL::TYPE_NAME_META_FIELD_DEFINITION, function() {
482 482
             return new Field(
483 483
                 '__typename',
484 484
                 'The name of the current Object type at runtime.',
485 485
                 newNonNull(String()),
486 486
                 [],
487
-                function ($source, $args, $context, ResolveInfo $info): string {
487
+                function($source, $args, $context, ResolveInfo $info): string {
488 488
                     $parentType = $info->getParentType();
489 489
                     return null !== $parentType ? $parentType->getName() : null;
490 490
                 },
Please login to merge, or discard this patch.
src/Schema/Schema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public function getDirective(string $name): ?Directive
167 167
     {
168
-        return find($this->directives, function (Directive $directive) use ($name) {
168
+        return find($this->directives, function(Directive $directive) use ($name) {
169 169
             return $directive->getName() === $name;
170 170
         });
171 171
     }
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 
221 221
             $this->possibleTypesMap[$abstractTypeName] = \array_reduce(
222 222
                 $possibleTypes,
223
-                function (array $map, TypeInterface $type) {
223
+                function(array $map, TypeInterface $type) {
224 224
                     /** @var NameAwareInterface $type */
225 225
                     $map[$type->getName()] = true;
226 226
                     return $map;
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
         if ($type instanceof ObjectType || $type instanceof InterfaceType) {
417 417
             foreach ($type->getFields() as $field) {
418 418
                 if ($field->hasArguments()) {
419
-                    $fieldArgTypes = \array_map(function (Argument $argument) {
419
+                    $fieldArgTypes = \array_map(function(Argument $argument) {
420 420
                         return $argument->getType();
421 421
                     }, $field->getArguments());
422 422
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
             return $map;
451 451
         }
452 452
 
453
-        return \array_reduce($directive->getArguments(), function ($map, Argument $argument) {
453
+        return \array_reduce($directive->getArguments(), function($map, Argument $argument) {
454 454
             return $this->typeMapReducer($map, $argument->getType());
455 455
         }, $map);
456 456
     }
Please login to merge, or discard this patch.