@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | // Assert each interface field arg is implemented. |
| 317 | 317 | foreach ($interfaceField->getArguments() as $interfaceArgument) { |
| 318 | 318 | $argumentName = $interfaceArgument->getName(); |
| 319 | - $objectArgument = find($objectField->getArguments(), function (Argument $argument) use ($argumentName) { |
|
| 319 | + $objectArgument = find($objectField->getArguments(), function(Argument $argument) use ($argumentName) { |
|
| 320 | 320 | return $argument->getName() === $argumentName; |
| 321 | 321 | }); |
| 322 | 322 | |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | $argumentName = $objectArgument->getName(); |
| 376 | 376 | $interfaceArgument = find( |
| 377 | 377 | $interfaceField->getArguments(), |
| 378 | - function (Argument $argument) use ($argumentName) { |
|
| 378 | + function(Argument $argument) use ($argumentName) { |
|
| 379 | 379 | return $argument->getName() === $argumentName; |
| 380 | 380 | } |
| 381 | 381 | ); |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | return null; |
| 715 | 715 | } |
| 716 | 716 | |
| 717 | - return \array_filter($node->getTypes(), function (NamedTypeNode $type) use ($memberTypeName) { |
|
| 717 | + return \array_filter($node->getTypes(), function(NamedTypeNode $type) use ($memberTypeName) { |
|
| 718 | 718 | return $type->getNameValue() === $memberTypeName; |
| 719 | 719 | }); |
| 720 | 720 | } |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | return null; |
| 734 | 734 | } |
| 735 | 735 | |
| 736 | - return \array_filter($node->getValues(), function (NameAwareInterface $type) use ($valueName) { |
|
| 736 | + return \array_filter($node->getValues(), function(NameAwareInterface $type) use ($valueName) { |
|
| 737 | 737 | return $type->getNameValue() === $valueName; |
| 738 | 738 | }); |
| 739 | 739 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | $builtInTypes = keyMap( |
| 97 | 97 | \array_merge(specifiedScalarTypes(), introspectionTypes()), |
| 98 | - function (NamedTypeInterface $type) { |
|
| 98 | + function(NamedTypeInterface $type) { |
|
| 99 | 99 | return $type->getName(); |
| 100 | 100 | } |
| 101 | 101 | ); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | return GraphQLDirective([ |
| 158 | 158 | 'name' => $node->getNameValue(), |
| 159 | 159 | 'description' => $node->getDescriptionValue(), |
| 160 | - 'locations' => \array_map(function (NameNode $node) { |
|
| 160 | + 'locations' => \array_map(function(NameNode $node) { |
|
| 161 | 161 | return $node->getValue(); |
| 162 | 162 | }, $node->getLocations()), |
| 163 | 163 | 'args' => $node->hasArguments() ? $this->buildArguments($node->getArguments()) : [], |
@@ -206,10 +206,10 @@ discard block |
||
| 206 | 206 | { |
| 207 | 207 | return keyValueMap( |
| 208 | 208 | $nodes, |
| 209 | - function (InputValueDefinitionNode $value) { |
|
| 209 | + function(InputValueDefinitionNode $value) { |
|
| 210 | 210 | return $value->getNameValue(); |
| 211 | 211 | }, |
| 212 | - function (InputValueDefinitionNode $value): array { |
|
| 212 | + function(InputValueDefinitionNode $value): array { |
|
| 213 | 213 | $type = $this->buildWrappedType($value->getType()); |
| 214 | 214 | $defaultValue = $value->getDefaultValue(); |
| 215 | 215 | return [ |
@@ -261,11 +261,11 @@ discard block |
||
| 261 | 261 | return GraphQLObjectType([ |
| 262 | 262 | 'name' => $node->getNameValue(), |
| 263 | 263 | 'description' => $node->getDescriptionValue(), |
| 264 | - 'fields' => function () use ($node) { |
|
| 264 | + 'fields' => function() use ($node) { |
|
| 265 | 265 | return $this->buildFields($node); |
| 266 | 266 | }, |
| 267 | - 'interfaces' => function () use ($node) { |
|
| 268 | - return $node->hasInterfaces() ? \array_map(function (NodeInterface $interface) { |
|
| 267 | + 'interfaces' => function() use ($node) { |
|
| 268 | + return $node->hasInterfaces() ? \array_map(function(NodeInterface $interface) { |
|
| 269 | 269 | return $this->buildType($interface); |
| 270 | 270 | }, $node->getInterfaces()) : []; |
| 271 | 271 | }, |
@@ -283,11 +283,11 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | return $node->hasFields() ? keyValueMap( |
| 285 | 285 | $node->getFields(), |
| 286 | - function ($value) { |
|
| 286 | + function($value) { |
|
| 287 | 287 | /** @noinspection PhpUndefinedMethodInspection */ |
| 288 | 288 | return $value->getNameValue(); |
| 289 | 289 | }, |
| 290 | - function ($value) use ($resolverMap) { |
|
| 290 | + function($value) use ($resolverMap) { |
|
| 291 | 291 | return $this->buildField($value, $resolverMap); |
| 292 | 292 | } |
| 293 | 293 | ) : []; |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | return GraphQLInterfaceType([ |
| 303 | 303 | 'name' => $node->getNameValue(), |
| 304 | 304 | 'description' => $node->getDescriptionValue(), |
| 305 | - 'fields' => function () use ($node): array { |
|
| 305 | + 'fields' => function() use ($node): array { |
|
| 306 | 306 | return $this->buildFields($node); |
| 307 | 307 | }, |
| 308 | 308 | 'astNode' => $node, |
@@ -320,10 +320,10 @@ discard block |
||
| 320 | 320 | 'description' => $node->getDescriptionValue(), |
| 321 | 321 | 'values' => $node->hasValues() ? keyValueMap( |
| 322 | 322 | $node->getValues(), |
| 323 | - function (EnumValueDefinitionNode $value): string { |
|
| 323 | + function(EnumValueDefinitionNode $value): string { |
|
| 324 | 324 | return $value->getNameValue(); |
| 325 | 325 | }, |
| 326 | - function (EnumValueDefinitionNode $value): array { |
|
| 326 | + function(EnumValueDefinitionNode $value): array { |
|
| 327 | 327 | return [ |
| 328 | 328 | 'description' => $value->getDescriptionValue(), |
| 329 | 329 | 'deprecationReason' => $this->getDeprecationReason($value), |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | return GraphQLUnionType([ |
| 345 | 345 | 'name' => $node->getNameValue(), |
| 346 | 346 | 'description' => $node->getDescriptionValue(), |
| 347 | - 'types' => $node->hasTypes() ? \array_map(function (TypeNodeInterface $type) { |
|
| 347 | + 'types' => $node->hasTypes() ? \array_map(function(TypeNodeInterface $type) { |
|
| 348 | 348 | return $this->buildType($type); |
| 349 | 349 | }, $node->getTypes()) : [], |
| 350 | 350 | 'astNode' => $node, |
@@ -360,7 +360,7 @@ discard block |
||
| 360 | 360 | return GraphQLScalarType([ |
| 361 | 361 | 'name' => $node->getNameValue(), |
| 362 | 362 | 'description' => $node->getDescriptionValue(), |
| 363 | - 'serialize' => function ($value) { |
|
| 363 | + 'serialize' => function($value) { |
|
| 364 | 364 | return $value; |
| 365 | 365 | }, |
| 366 | 366 | 'astNode' => $node, |
@@ -376,13 +376,13 @@ discard block |
||
| 376 | 376 | return GraphQLInputObjectType([ |
| 377 | 377 | 'name' => $node->getNameValue(), |
| 378 | 378 | 'description' => $node->getDescriptionValue(), |
| 379 | - 'fields' => $node->hasFields() ? function () use ($node) { |
|
| 379 | + 'fields' => $node->hasFields() ? function() use ($node) { |
|
| 380 | 380 | return keyValueMap( |
| 381 | 381 | $node->getFields(), |
| 382 | - function (InputValueDefinitionNode $value): string { |
|
| 382 | + function(InputValueDefinitionNode $value): string { |
|
| 383 | 383 | return $value->getNameValue(); |
| 384 | 384 | }, |
| 385 | - function (InputValueDefinitionNode $value): array { |
|
| 385 | + function(InputValueDefinitionNode $value): array { |
|
| 386 | 386 | $type = $this->buildWrappedType($value->getType()); |
| 387 | 387 | $defaultValue = $value->getDefaultValue(); |
| 388 | 388 | return [ |