Passed
Pull Request — master (#130)
by Quang
02:08
created
src/SchemaValidator/SchemaValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         $errors = $this->validate($schema);
53 53
 
54 54
         if (!empty($errors)) {
55
-            $message = \implode("\n", \array_map(function (ValidationException $error) {
55
+            $message = \implode("\n", \array_map(function(ValidationException $error) {
56 56
                 return $error->getMessage();
57 57
             }, $errors));
58 58
 
Please login to merge, or discard this patch.
src/Error/GraphQLException.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getLocationsAsArray(): ?array
154 154
     {
155
-        return !empty($this->locations) ? array_map(function (SourceLocation $location) {
155
+        return !empty($this->locations) ? array_map(function(SourceLocation $location) {
156 156
             return $location->toArray();
157 157
         }, $this->locations) : null;
158 158
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             ? (!empty($nodes) ? $nodes : [])
192 192
             : (null !== $nodes ? [$nodes] : []);
193 193
 
194
-        $this->nodes = \array_filter($nodes, function ($node) {
194
+        $this->nodes = \array_filter($nodes, function($node) {
195 195
             return null !== $node;
196 196
         });
197 197
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     protected function resolvePositions(?array $positions)
223 223
     {
224 224
         if (null === $positions && !empty($this->nodes)) {
225
-            $positions = array_reduce($this->nodes, function (array $list, ?NodeInterface $node) {
225
+            $positions = array_reduce($this->nodes, function(array $list, ?NodeInterface $node) {
226 226
                 if (null !== $node) {
227 227
                     $location = $node->getLocation();
228 228
                     if (null !== $location) {
@@ -250,11 +250,11 @@  discard block
 block discarded – undo
250 250
     protected function resolveLocations(?array $positions, ?Source $source)
251 251
     {
252 252
         if (null !== $positions && null !== $source) {
253
-            $locations = array_map(function ($position) use ($source) {
253
+            $locations = array_map(function($position) use ($source) {
254 254
                 return SourceLocation::fromSource($source, $position);
255 255
             }, $positions);
256 256
         } elseif (!empty($this->nodes)) {
257
-            $locations = array_reduce($this->nodes, function (array $list, NodeInterface $node) {
257
+            $locations = array_reduce($this->nodes, function(array $list, NodeInterface $node) {
258 258
                 $location = $node->getLocation();
259 259
                 if (null !== $location) {
260 260
                     $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart());
Please login to merge, or discard this patch.
src/SchemaValidator/Rule/TypesRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
             // Assert each interface field arg is implemented.
309 309
             foreach ($interfaceField->getArguments() as $interfaceArgument) {
310 310
                 $argumentName   = $interfaceArgument->getName();
311
-                $objectArgument = find($objectField->getArguments(), function (Argument $argument) use ($argumentName) {
311
+                $objectArgument = find($objectField->getArguments(), function(Argument $argument) use ($argumentName) {
312 312
                     return $argument->getName() === $argumentName;
313 313
                 });
314 314
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
                 foreach ($objectFields as $objectArgument) {
367 367
                     $argumentName      = $objectArgument->getName();
368 368
                     $interfaceArgument = find($interfaceField->getArguments(),
369
-                        function (Argument $argument) use ($argumentName) {
369
+                        function(Argument $argument) use ($argumentName) {
370 370
                             return $argument->getName() === $argumentName;
371 371
                         });
372 372
 
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
             return null;
702 702
         }
703 703
 
704
-        return \array_filter($node->getTypes(), function (NamedTypeNode $type) use ($memberTypeName) {
704
+        return \array_filter($node->getTypes(), function(NamedTypeNode $type) use ($memberTypeName) {
705 705
             return $type->getNameValue() === $memberTypeName;
706 706
         });
707 707
     }
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
             return null;
721 721
         }
722 722
 
723
-        return \array_filter($node->getValues(), function (NameAwareInterface $type) use ($valueName) {
723
+        return \array_filter($node->getValues(), function(NameAwareInterface $type) use ($valueName) {
724 724
             return $type->getNameValue() === $valueName;
725 725
         });
726 726
     }
Please login to merge, or discard this patch.
src/SchemaBuilder/DefinitionBuilder.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
         $builtInTypes = keyMap(
99 99
             array_merge(specifiedScalarTypes(), introspectionTypes()),
100
-            function (NamedTypeInterface $type) {
100
+            function(NamedTypeInterface $type) {
101 101
                 return $type->getName();
102 102
             }
103 103
         );
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         return GraphQLDirective([
161 161
             'name'        => $node->getNameValue(),
162 162
             'description' => $node->getDescriptionValue(),
163
-            'locations'   => array_map(function (NameNode $node) {
163
+            'locations'   => array_map(function(NameNode $node) {
164 164
                 return $node->getValue();
165 165
             }, $node->getLocations()),
166 166
             'arguments'   => $node->hasArguments() ? $this->buildArguments($node->getArguments()) : [],
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
     {
208 208
         return keyValMap(
209 209
             $nodes,
210
-            function (InputValueDefinitionNode $value) {
210
+            function(InputValueDefinitionNode $value) {
211 211
                 return $value->getNameValue();
212 212
             },
213
-            function (InputValueDefinitionNode $value): array {
213
+            function(InputValueDefinitionNode $value): array {
214 214
                 $type = $this->buildWrappedType($value->getType());
215 215
                 return [
216 216
                     'type'         => $type,
@@ -259,11 +259,11 @@  discard block
 block discarded – undo
259 259
         return GraphQLObjectType([
260 260
             'name'        => $node->getNameValue(),
261 261
             'description' => $node->getDescriptionValue(),
262
-            'fields'      => function () use ($node) {
262
+            'fields'      => function() use ($node) {
263 263
                 return $this->buildFields($node);
264 264
             },
265
-            'interfaces'  => function () use ($node) {
266
-                return $node->hasInterfaces() ? array_map(function (NodeInterface $interface) {
265
+            'interfaces'  => function() use ($node) {
266
+                return $node->hasInterfaces() ? array_map(function(NodeInterface $interface) {
267 267
                     return $this->buildType($interface);
268 268
                 }, $node->getInterfaces()) : [];
269 269
             },
@@ -280,11 +280,11 @@  discard block
 block discarded – undo
280 280
 
281 281
         return $node->hasFields() ? keyValMap(
282 282
             $node->getFields(),
283
-            function ($value) {
283
+            function($value) {
284 284
                 /** @noinspection PhpUndefinedMethodInspection */
285 285
                 return $value->getNameValue();
286 286
             },
287
-            function ($value) use ($resolverMap) {
287
+            function($value) use ($resolverMap) {
288 288
                 return $this->buildField($value, $resolverMap);
289 289
             }
290 290
         ) : [];
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         return GraphQLInterfaceType([
300 300
             'name'        => $node->getNameValue(),
301 301
             'description' => $node->getDescriptionValue(),
302
-            'fields'      => function () use ($node): array {
302
+            'fields'      => function() use ($node): array {
303 303
                 return $this->buildFields($node);
304 304
             },
305 305
             'astNode'     => $node,
@@ -317,10 +317,10 @@  discard block
 block discarded – undo
317 317
             'description' => $node->getDescriptionValue(),
318 318
             'values'      => $node->hasValues() ? keyValMap(
319 319
                 $node->getValues(),
320
-                function (EnumValueDefinitionNode $value): string {
320
+                function(EnumValueDefinitionNode $value): string {
321 321
                     return $value->getNameValue();
322 322
                 },
323
-                function (EnumValueDefinitionNode $value): array {
323
+                function(EnumValueDefinitionNode $value): array {
324 324
                     return [
325 325
                         'description'       => $value->getDescriptionValue(),
326 326
                         'deprecationReason' => $this->getDeprecationReason($value),
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         return GraphQLUnionType([
342 342
             'name'        => $node->getNameValue(),
343 343
             'description' => $node->getDescriptionValue(),
344
-            'types'       => $node->hasTypes() ? array_map(function (TypeNodeInterface $type) {
344
+            'types'       => $node->hasTypes() ? array_map(function(TypeNodeInterface $type) {
345 345
                 return $this->buildType($type);
346 346
             }, $node->getTypes()) : [],
347 347
             'astNode'     => $node,
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
         return GraphQLScalarType([
358 358
             'name'        => $node->getNameValue(),
359 359
             'description' => $node->getDescriptionValue(),
360
-            'serialize'   => function ($value) {
360
+            'serialize'   => function($value) {
361 361
                 return $value;
362 362
             },
363 363
             'astNode'     => $node,
@@ -373,13 +373,13 @@  discard block
 block discarded – undo
373 373
         return GraphQLInputObjectType([
374 374
             'name'        => $node->getNameValue(),
375 375
             'description' => $node->getDescriptionValue(),
376
-            'fields'      => $node->hasFields() ? function () use ($node) {
376
+            'fields'      => $node->hasFields() ? function() use ($node) {
377 377
                 return keyValMap(
378 378
                     $node->getFields(),
379
-                    function (InputValueDefinitionNode $value): string {
379
+                    function(InputValueDefinitionNode $value): string {
380 380
                         return $value->getNameValue();
381 381
                     },
382
-                    function (InputValueDefinitionNode $value): array {
382
+                    function(InputValueDefinitionNode $value): array {
383 383
                         $type = $this->buildWrappedType($value->getType());
384 384
                         return [
385 385
                             'type'         => $type,
Please login to merge, or discard this patch.
src/SchemaBuilder/SchemaBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,27 +78,27 @@
 block discarded – undo
78 78
 
79 79
         $this->definitionBuilder->setTypeDefinitionMap($nodeMap);
80 80
 
81
-        $types = array_map(function (TypeDefinitionNodeInterface $definition) {
81
+        $types = array_map(function(TypeDefinitionNodeInterface $definition) {
82 82
             return $this->definitionBuilder->buildType($definition);
83 83
         }, $typeDefinitions);
84 84
 
85
-        $directives = array_map(function (DirectiveDefinitionNode $definition) {
85
+        $directives = array_map(function(DirectiveDefinitionNode $definition) {
86 86
             return $this->definitionBuilder->buildDirective($definition);
87 87
         }, $directiveDefinitions);
88 88
 
89
-        if (!arraySome($directives, function (DirectiveInterface $directive) {
89
+        if (!arraySome($directives, function(DirectiveInterface $directive) {
90 90
             return $directive->getName() === 'skip';
91 91
         })) {
92 92
             $directives[] = GraphQLSkipDirective();
93 93
         }
94 94
 
95
-        if (!arraySome($directives, function (DirectiveInterface $directive) {
95
+        if (!arraySome($directives, function(DirectiveInterface $directive) {
96 96
             return $directive->getName() === 'include';
97 97
         })) {
98 98
             $directives[] = GraphQLIncludeDirective();
99 99
         }
100 100
 
101
-        if (!arraySome($directives, function (DirectiveInterface $directive) {
101
+        if (!arraySome($directives, function(DirectiveInterface $directive) {
102 102
             return $directive->getName() === 'deprecated';
103 103
         })) {
104 104
             $directives[] = GraphQLDeprecatedDirective();
Please login to merge, or discard this patch.
src/Type/introspection.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         'name'        => '__schema',
86 86
         'type'        => GraphQLNonNull(__Schema()),
87 87
         'description' => 'Access the current type schema of this server.',
88
-        'resolve'     => function ($source, $args, $context, ResolveInfo $info): SchemaInterface {
88
+        'resolve'     => function($source, $args, $context, ResolveInfo $info): SchemaInterface {
89 89
             $schema = $info->getSchema();
90 90
             return $schema;
91 91
         }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         'args'        => [
106 106
             'name' => ['type' => GraphQLNonNull(GraphQLString())],
107 107
         ],
108
-        'resolve'     => function ($source, $args, $context, ResolveInfo $info): TypeInterface {
108
+        'resolve'     => function($source, $args, $context, ResolveInfo $info): TypeInterface {
109 109
             /** @var SchemaInterface $schema */
110 110
             $name   = $args['name'];
111 111
             $schema = $info->getSchema();
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         'name'        => '__typename',
125 125
         'type'        => GraphQLNonNull(GraphQLString()),
126 126
         'description' => 'The name of the current Object type at runtime.',
127
-        'resolve'     => function ($source, $args, $context, ResolveInfo $info): string {
127
+        'resolve'     => function($source, $args, $context, ResolveInfo $info): string {
128 128
             /** @var NamedTypeInterface $parentType */
129 129
             $parentType = $info->getParentType();
130 130
             return $parentType->getName();
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 {
158 158
     return arraySome(
159 159
         introspectionTypes(),
160
-        function (TypeInterface $introspectionType) use ($type) {
160
+        function(TypeInterface $introspectionType) use ($type) {
161 161
             /** @noinspection PhpUndefinedMethodInspection */
162 162
             return $type->getName() === $introspectionType->getName();
163 163
         }
Please login to merge, or discard this patch.
src/Type/IntrospectionTypesProvider.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function register()
43 43
     {
44
-        $this->container->add(GraphQL::INTROSPECTION_SCHEMA, function () {
44
+        $this->container->add(GraphQL::INTROSPECTION_SCHEMA, function() {
45 45
             return GraphQLObjectType([
46 46
                 'name'            => GraphQL::INTROSPECTION_SCHEMA,
47 47
                 'isIntrospection' => true,
@@ -49,19 +49,19 @@  discard block
 block discarded – undo
49 49
                     'A GraphQL Schema defines the capabilities of a GraphQL server. It ' .
50 50
                     'exposes all available types and directives on the server, as well as ' .
51 51
                     'the entry points for query, mutation, and subscription operations.',
52
-                'fields'          => function () {
52
+                'fields'          => function() {
53 53
                     return [
54 54
                         'types'            => [
55 55
                             'description' => 'A list of all types supported by this server.',
56 56
                             'type'        => GraphQLNonNull(GraphQLList(GraphQLNonNull(__Type()))),
57
-                            'resolve'     => function (SchemaInterface $schema): array {
57
+                            'resolve'     => function(SchemaInterface $schema): array {
58 58
                                 return array_values($schema->getTypeMap());
59 59
                             },
60 60
                         ],
61 61
                         'queryType'        => [
62 62
                             'description' => 'The type that query operations will be rooted at.',
63 63
                             'type'        => GraphQLNonNull(__Type()),
64
-                            'resolve'     => function (SchemaInterface $schema): ObjectType {
64
+                            'resolve'     => function(SchemaInterface $schema): ObjectType {
65 65
                                 return $schema->getQuery();
66 66
                             },
67 67
                         ],
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                                 'If this server supports mutation, the type that ' .
71 71
                                 'mutation operations will be rooted at.',
72 72
                             'type'        => __Type(),
73
-                            'resolve'     => function (SchemaInterface $schema): ObjectType {
73
+                            'resolve'     => function(SchemaInterface $schema): ObjectType {
74 74
                                 return $schema->getMutation();
75 75
                             },
76 76
                         ],
@@ -79,14 +79,14 @@  discard block
 block discarded – undo
79 79
                                 'If this server support subscription, the type that ' .
80 80
                                 'subscription operations will be rooted at.',
81 81
                             'type'        => __Type(),
82
-                            'resolve'     => function (SchemaInterface $schema): ObjectType {
82
+                            'resolve'     => function(SchemaInterface $schema): ObjectType {
83 83
                                 return $schema->getSubscription();
84 84
                             },
85 85
                         ],
86 86
                         'directives'       => [
87 87
                             'description' => 'A list of all directives supported by this server.',
88 88
                             'type'        => GraphQLNonNull(GraphQLList(GraphQLNonNull(__Directive()))),
89
-                            'resolve'     => function (SchemaInterface $schema): array {
89
+                            'resolve'     => function(SchemaInterface $schema): array {
90 90
                                 return $schema->getDirectives();
91 91
                             },
92 92
                         ],
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             ]);
96 96
         }, true/* $shared */);
97 97
 
98
-        $this->container->add(GraphQL::INTROSPECTION_DIRECTIVE, function () {
98
+        $this->container->add(GraphQL::INTROSPECTION_DIRECTIVE, function() {
99 99
             return GraphQLObjectType([
100 100
                 'name'            => GraphQL::INTROSPECTION_DIRECTIVE,
101 101
                 'isIntrospection' => true,
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                     'execution behavior in ways field arguments will not suffice, such as ' .
107 107
                     'conditionally including or skipping a field. Directives provide this by ' .
108 108
                     'describing additional information to the executor.',
109
-                'fields'          => function () {
109
+                'fields'          => function() {
110 110
                     return [
111 111
                         'name'        => ['type' => GraphQLNonNull(GraphQLString())],
112 112
                         'description' => ['type' => GraphQLString()],
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                         ],
116 116
                         'args'        => [
117 117
                             'type'    => GraphQLNonNull(GraphQLList(GraphQLNonNull(__InputValue()))),
118
-                            'resolve' => function (DirectiveInterface $directive): array {
118
+                            'resolve' => function(DirectiveInterface $directive): array {
119 119
                                 return $directive->getArguments() ?: [];
120 120
                             },
121 121
                         ],
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             ]);
125 125
         }, true/* $shared */);
126 126
 
127
-        $this->container->add(GraphQL::INTROSPECTION_DIRECTIVE_LOCATION, function () {
127
+        $this->container->add(GraphQL::INTROSPECTION_DIRECTIVE_LOCATION, function() {
128 128
             return GraphQLEnumType([
129 129
                 'name'            => GraphQL::INTROSPECTION_DIRECTIVE_LOCATION,
130 130
                 'isIntrospection' => true,
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             ]);
191 191
         }, true/* $shared */);
192 192
 
193
-        $this->container->add(GraphQL::INTROSPECTION_TYPE, function () {
193
+        $this->container->add(GraphQL::INTROSPECTION_TYPE, function() {
194 194
             return GraphQLObjectType([
195 195
                 'name'            => GraphQL::INTROSPECTION_TYPE,
196 196
                 'isIntrospection' => true,
@@ -203,11 +203,11 @@  discard block
 block discarded – undo
203 203
                     'Object and Interface types provide the fields they describe. Abstract ' .
204 204
                     'types, Union and Interface, provide the Object types possible ' .
205 205
                     'at runtime. List and NonNull types compose other types.',
206
-                'fields'          => function () {
206
+                'fields'          => function() {
207 207
                     return [
208 208
                         'kind'          => [
209 209
                             'type'    => GraphQLNonNull(__TypeKind()),
210
-                            'resolve' => function (TypeInterface $type) {
210
+                            'resolve' => function(TypeInterface $type) {
211 211
                                 if ($type instanceof ScalarType) {
212 212
                                     return TypeKindEnum::SCALAR;
213 213
                                 }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
                             'args'    => [
244 244
                                 'includeDeprecated' => ['type' => GraphQLBoolean(), 'defaultValue' => false],
245 245
                             ],
246
-                            'resolve' => function (TypeInterface $type, array $args):
246
+                            'resolve' => function(TypeInterface $type, array $args):
247 247
                             ?array {
248 248
                                 $includeDeprecated = $args[0] ?? null;
249 249
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                                     $fields = array_values($type->getFields());
252 252
 
253 253
                                     if (!$includeDeprecated) {
254
-                                        $fields = array_filter($fields, function (Field $field) {
254
+                                        $fields = array_filter($fields, function(Field $field) {
255 255
                                             return !$field->isDeprecated();
256 256
                                         });
257 257
                                     }
@@ -264,13 +264,13 @@  discard block
 block discarded – undo
264 264
                         ],
265 265
                         'interfaces'    => [
266 266
                             'type'    => GraphQLList(GraphQLNonNull(__Type())),
267
-                            'resolve' => function (TypeInterface $type): ?array {
267
+                            'resolve' => function(TypeInterface $type): ?array {
268 268
                                 return $type instanceof ObjectType ? $type->getInterfaces() : null;
269 269
                             },
270 270
                         ],
271 271
                         'possibleTypes' => [
272 272
                             'type'    => GraphQLList(GraphQLNonNull(__Type())),
273
-                            'resolve' => function (TypeInterface $type, array $args, array $context, ResolveInfo
273
+                            'resolve' => function(TypeInterface $type, array $args, array $context, ResolveInfo
274 274
                             $info):
275 275
                             ?array {
276 276
                                 /** @var SchemaInterface $schema */
@@ -284,14 +284,14 @@  discard block
 block discarded – undo
284 284
                             'args'    => [
285 285
                                 'includeDeprecated' => ['type' => GraphQLBoolean(), 'defaultValue' => false],
286 286
                             ],
287
-                            'resolve' => function (TypeInterface $type, array $args): ?array {
287
+                            'resolve' => function(TypeInterface $type, array $args): ?array {
288 288
                                 [$includeDeprecated] = $args;
289 289
 
290 290
                                 if ($type instanceof EnumType) {
291 291
                                     $values = array_values($type->getValues());
292 292
 
293 293
                                     if (!$includeDeprecated) {
294
-                                        $values = array_filter($values, function (Field $field) {
294
+                                        $values = array_filter($values, function(Field $field) {
295 295
                                             return !$field->isDeprecated();
296 296
                                         });
297 297
                                     }
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                         ],
305 305
                         'inputFields'   => [
306 306
                             'type'    => GraphQLList(GraphQLNonNull(__InputValue())),
307
-                            'resolve' => function (TypeInterface $type): ?array {
307
+                            'resolve' => function(TypeInterface $type): ?array {
308 308
                                 return $type instanceof InputObjectType ? $type->getFields() : null;
309 309
                             },
310 310
                         ],
@@ -314,20 +314,20 @@  discard block
 block discarded – undo
314 314
             ]);
315 315
         }, true/* $shared */);
316 316
 
317
-        $this->container->add(GraphQL::INTROSPECTION_FIELD, function () {
317
+        $this->container->add(GraphQL::INTROSPECTION_FIELD, function() {
318 318
             return GraphQLObjectType([
319 319
                 'name'            => GraphQL::INTROSPECTION_FIELD,
320 320
                 'isIntrospection' => true,
321 321
                 'description'     =>
322 322
                     'Object and Interface types are described by a list of Fields, each of ' .
323 323
                     'which has a name, potentially a list of arguments, and a return type.',
324
-                'fields'          => function () {
324
+                'fields'          => function() {
325 325
                     return [
326 326
                         'name'              => ['type' => GraphQLNonNull(GraphQLString())],
327 327
                         'description'       => ['type' => GraphQLString()],
328 328
                         'args'              => [
329 329
                             'type'    => GraphQLNonNull(GraphQLList(GraphQLNonNull(__InputValue()))),
330
-                            'resolve' => function (DirectiveInterface $directive): array {
330
+                            'resolve' => function(DirectiveInterface $directive): array {
331 331
                                 return $directive->getArguments() ?: [];
332 332
                             },
333 333
                         ],
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
             ]);
340 340
         }, true/* $shared */);
341 341
 
342
-        $this->container->add(GraphQL::INTROSPECTION_INPUT_VALUE, function () {
342
+        $this->container->add(GraphQL::INTROSPECTION_INPUT_VALUE, function() {
343 343
             return GraphQLObjectType([
344 344
                 'name'            => GraphQL::INTROSPECTION_INPUT_VALUE,
345 345
                 'isIntrospection' => true,
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                     'Arguments provided to Fields or Directives and the input fields of an ' .
348 348
                     'InputObject are represented as Input Values which describe their type ' .
349 349
                     'and optionally a default value.',
350
-                'fields'          => function () {
350
+                'fields'          => function() {
351 351
                     return [
352 352
                         'name'         => ['type' => GraphQLNonNull(GraphQLString())],
353 353
                         'description'  => ['type' => GraphQLString()],
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
                             'description' =>
358 358
                                 'A GraphQL-formatted string representing the default value for this ' .
359 359
                                 'input value.',
360
-                            'resolve'     => function ($inputValue) {
360
+                            'resolve'     => function($inputValue) {
361 361
                                 // TODO: Implement this when we have support for printing AST.
362 362
                                 return null;
363 363
                             }
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
             ]);
368 368
         }, true/* $shared */);
369 369
 
370
-        $this->container->add(GraphQL::INTROSPECTION_ENUM_VALUE, function () {
370
+        $this->container->add(GraphQL::INTROSPECTION_ENUM_VALUE, function() {
371 371
             return GraphQLObjectType([
372 372
                 'name'            => GraphQL::INTROSPECTION_ENUM_VALUE,
373 373
                 'isIntrospection' => true,
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
                     'One possible value for a given Enum. Enum values are unique values, not ' .
376 376
                     'a placeholder for a string or numeric value. However an Enum value is ' .
377 377
                     'returned in a JSON response as a string.',
378
-                'fields'          => function () {
378
+                'fields'          => function() {
379 379
                     return [
380 380
                         'name'              => ['type' => GraphQLNonNull(GraphQLString())],
381 381
                         'description'       => ['type' => GraphQLString()],
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
             ]);
387 387
         }, true/* $shared */);
388 388
 
389
-        $this->container->add(GraphQL::INTROSPECTION_TYPE_KIND, function () {
389
+        $this->container->add(GraphQL::INTROSPECTION_TYPE_KIND, function() {
390 390
             return GraphQLEnumType([
391 391
                 'name'            => GraphQL::INTROSPECTION_TYPE_KIND,
392 392
                 'isIntrospection' => true,
Please login to merge, or discard this patch.