@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function buildTypes(): array |
79 | 79 | { |
80 | - return \array_map(function (TypeDefinitionNodeInterface $definition) { |
|
80 | + return \array_map(function(TypeDefinitionNodeInterface $definition) { |
|
81 | 81 | return $this->definitionBuilder->buildType($definition); |
82 | 82 | }, \array_values($this->info->getTypeDefinitionMap())); |
83 | 83 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function buildDirectives(): array |
89 | 89 | { |
90 | - $directives = \array_map(function (DirectiveDefinitionNode $definition) { |
|
90 | + $directives = \array_map(function(DirectiveDefinitionNode $definition) { |
|
91 | 91 | return $this->definitionBuilder->buildDirective($definition); |
92 | 92 | }, $this->info->getDirectiveDefinitions()); |
93 | 93 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ]; |
99 | 99 | |
100 | 100 | foreach ($specifiedDirectivesMap as $name => $directive) { |
101 | - if (!arraySome($directives, function (Directive $directive) use ($name) { |
|
101 | + if (!arraySome($directives, function(Directive $directive) use ($name) { |
|
102 | 102 | return $directive->getName() === $name; |
103 | 103 | })) { |
104 | 104 | $directives[] = $directive; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $builtInTypes = keyMap( |
98 | 98 | \array_merge(specifiedScalarTypes(), introspectionTypes()), |
99 | - function (NamedTypeInterface $type) { |
|
99 | + function(NamedTypeInterface $type) { |
|
100 | 100 | return $type->getName(); |
101 | 101 | } |
102 | 102 | ); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function buildTypes(array $nodes): array |
113 | 113 | { |
114 | - return \array_map(function (NodeInterface $node) { |
|
114 | + return \array_map(function(NodeInterface $node) { |
|
115 | 115 | return $this->buildType($node); |
116 | 116 | }, $nodes); |
117 | 117 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | return newDirective([ |
148 | 148 | 'name' => $node->getNameValue(), |
149 | 149 | 'description' => $node->getDescriptionValue(), |
150 | - 'locations' => \array_map(function (NameNode $node) { |
|
150 | + 'locations' => \array_map(function(NameNode $node) { |
|
151 | 151 | return $node->getValue(); |
152 | 152 | }, $node->getLocations()), |
153 | 153 | 'args' => $node->hasArguments() ? $this->buildArguments($node->getArguments()) : [], |
@@ -191,10 +191,10 @@ discard block |
||
191 | 191 | { |
192 | 192 | return keyValueMap( |
193 | 193 | $nodes, |
194 | - function (InputValueDefinitionNode $value) { |
|
194 | + function(InputValueDefinitionNode $value) { |
|
195 | 195 | return $value->getNameValue(); |
196 | 196 | }, |
197 | - function (InputValueDefinitionNode $value): array { |
|
197 | + function(InputValueDefinitionNode $value): array { |
|
198 | 198 | $type = $this->buildWrappedType($value->getType()); |
199 | 199 | $defaultValue = $value->getDefaultValue(); |
200 | 200 | return [ |
@@ -246,11 +246,11 @@ discard block |
||
246 | 246 | return newObjectType([ |
247 | 247 | 'name' => $node->getNameValue(), |
248 | 248 | 'description' => $node->getDescriptionValue(), |
249 | - 'fields' => function () use ($node) { |
|
249 | + 'fields' => function() use ($node) { |
|
250 | 250 | return $this->buildFields($node); |
251 | 251 | }, |
252 | - 'interfaces' => function () use ($node) { |
|
253 | - return $node->hasInterfaces() ? \array_map(function (NodeInterface $interface) { |
|
252 | + 'interfaces' => function() use ($node) { |
|
253 | + return $node->hasInterfaces() ? \array_map(function(NodeInterface $interface) { |
|
254 | 254 | return $this->buildType($interface); |
255 | 255 | }, $node->getInterfaces()) : []; |
256 | 256 | }, |
@@ -266,11 +266,11 @@ discard block |
||
266 | 266 | { |
267 | 267 | return $node->hasFields() ? keyValueMap( |
268 | 268 | $node->getFields(), |
269 | - function ($value) { |
|
269 | + function($value) { |
|
270 | 270 | /** @var FieldDefinitionNode|InputValueDefinitionNode $value */ |
271 | 271 | return $value->getNameValue(); |
272 | 272 | }, |
273 | - function ($value) use ($node) { |
|
273 | + function($value) use ($node) { |
|
274 | 274 | /** @var FieldDefinitionNode|InputValueDefinitionNode $value */ |
275 | 275 | $resolve = null !== $this->resolverRegistry |
276 | 276 | ? $this->resolverRegistry->lookup($node->getNameValue(), $value->getNameValue()) |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | return newInterfaceType([ |
291 | 291 | 'name' => $node->getNameValue(), |
292 | 292 | 'description' => $node->getDescriptionValue(), |
293 | - 'fields' => function () use ($node): array { |
|
293 | + 'fields' => function() use ($node): array { |
|
294 | 294 | return $this->buildFields($node); |
295 | 295 | }, |
296 | 296 | 'astNode' => $node, |
@@ -308,10 +308,10 @@ discard block |
||
308 | 308 | 'description' => $node->getDescriptionValue(), |
309 | 309 | 'values' => $node->hasValues() ? keyValueMap( |
310 | 310 | $node->getValues(), |
311 | - function (EnumValueDefinitionNode $value): string { |
|
311 | + function(EnumValueDefinitionNode $value): string { |
|
312 | 312 | return $value->getNameValue(); |
313 | 313 | }, |
314 | - function (EnumValueDefinitionNode $value): array { |
|
314 | + function(EnumValueDefinitionNode $value): array { |
|
315 | 315 | return [ |
316 | 316 | 'description' => $value->getDescriptionValue(), |
317 | 317 | 'deprecationReason' => $this->getDeprecationReason($value), |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | return newUnionType([ |
333 | 333 | 'name' => $node->getNameValue(), |
334 | 334 | 'description' => $node->getDescriptionValue(), |
335 | - 'types' => $node->hasTypes() ? \array_map(function (TypeNodeInterface $type) { |
|
335 | + 'types' => $node->hasTypes() ? \array_map(function(TypeNodeInterface $type) { |
|
336 | 336 | return $this->buildType($type); |
337 | 337 | }, $node->getTypes()) : [], |
338 | 338 | 'astNode' => $node, |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | return newScalarType([ |
349 | 349 | 'name' => $node->getNameValue(), |
350 | 350 | 'description' => $node->getDescriptionValue(), |
351 | - 'serialize' => function ($value) { |
|
351 | + 'serialize' => function($value) { |
|
352 | 352 | return $value; |
353 | 353 | }, |
354 | 354 | 'astNode' => $node, |
@@ -364,13 +364,13 @@ discard block |
||
364 | 364 | return newInputObjectType([ |
365 | 365 | 'name' => $node->getNameValue(), |
366 | 366 | 'description' => $node->getDescriptionValue(), |
367 | - 'fields' => $node->hasFields() ? function () use ($node) { |
|
367 | + 'fields' => $node->hasFields() ? function() use ($node) { |
|
368 | 368 | return keyValueMap( |
369 | 369 | $node->getFields(), |
370 | - function (InputValueDefinitionNode $value): string { |
|
370 | + function(InputValueDefinitionNode $value): string { |
|
371 | 371 | return $value->getNameValue(); |
372 | 372 | }, |
373 | - function (InputValueDefinitionNode $value): array { |
|
373 | + function(InputValueDefinitionNode $value): array { |
|
374 | 374 | $type = $this->buildWrappedType($value->getType()); |
375 | 375 | $defaultValue = $value->getDefaultValue(); |
376 | 376 | return [ |