@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | $builtInTypes = keyMap( |
| 78 | 78 | array_merge(specifiedScalarTypes()/*, introspectionTypes()*/), |
| 79 | - function (NamedTypeInterface $type) { |
|
| 79 | + function(NamedTypeInterface $type) { |
|
| 80 | 80 | return $type->getName(); |
| 81 | 81 | } |
| 82 | 82 | ); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | return GraphQLDirective([ |
| 130 | 130 | 'name' => $node->getNameValue(), |
| 131 | 131 | 'description' => $node->getDescriptionValue(), |
| 132 | - 'locations' => array_map(function (NameNode $node) { |
|
| 132 | + 'locations' => array_map(function(NameNode $node) { |
|
| 133 | 133 | return $node->getValue(); |
| 134 | 134 | }, $node->getLocations()), |
| 135 | 135 | 'arguments' => $node->hasArguments() ? $this->buildArguments($node->getArguments()) : [], |
@@ -174,10 +174,10 @@ discard block |
||
| 174 | 174 | { |
| 175 | 175 | return keyValMap( |
| 176 | 176 | $nodes, |
| 177 | - function (InputValueDefinitionNode $value) { |
|
| 177 | + function(InputValueDefinitionNode $value) { |
|
| 178 | 178 | return $value->getNameValue(); |
| 179 | 179 | }, |
| 180 | - function (InputValueDefinitionNode $value): array { |
|
| 180 | + function(InputValueDefinitionNode $value): array { |
|
| 181 | 181 | $type = $this->buildWrappedType($value->getType()); |
| 182 | 182 | return [ |
| 183 | 183 | 'type' => $type, |
@@ -226,11 +226,11 @@ discard block |
||
| 226 | 226 | return GraphQLObjectType([ |
| 227 | 227 | 'name' => $node->getNameValue(), |
| 228 | 228 | 'description' => $node->getDescriptionValue(), |
| 229 | - 'fields' => function () use ($node) { |
|
| 229 | + 'fields' => function() use ($node) { |
|
| 230 | 230 | return $this->buildFields($node); |
| 231 | 231 | }, |
| 232 | - 'interfaces' => function () use ($node) { |
|
| 233 | - return $node->hasInterfaces() ? array_map(function (InterfaceTypeDefinitionNode $interface) { |
|
| 232 | + 'interfaces' => function() use ($node) { |
|
| 233 | + return $node->hasInterfaces() ? array_map(function(InterfaceTypeDefinitionNode $interface) { |
|
| 234 | 234 | return $this->buildType($interface); |
| 235 | 235 | }, $node->getInterfaces()) : []; |
| 236 | 236 | }, |
@@ -245,10 +245,10 @@ discard block |
||
| 245 | 245 | { |
| 246 | 246 | return $node->hasFields() ? keyValMap( |
| 247 | 247 | $node->getFields(), |
| 248 | - function ($value) { |
|
| 248 | + function($value) { |
|
| 249 | 249 | return $value->getNameValue(); |
| 250 | 250 | }, |
| 251 | - function ($value) { |
|
| 251 | + function($value) { |
|
| 252 | 252 | return $this->buildField($value); |
| 253 | 253 | } |
| 254 | 254 | ) : []; |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | return GraphQLInterfaceType([ |
| 264 | 264 | 'name' => $node->getNameValue(), |
| 265 | 265 | 'description' => $node->getDescriptionValue(), |
| 266 | - 'fields' => function () use ($node): array { |
|
| 266 | + 'fields' => function() use ($node): array { |
|
| 267 | 267 | return $this->buildFields($node); |
| 268 | 268 | }, |
| 269 | 269 | 'astNode' => $node, |
@@ -281,10 +281,10 @@ discard block |
||
| 281 | 281 | 'description' => $node->getDescriptionValue(), |
| 282 | 282 | 'values' => $node->hasValues() ? keyValMap( |
| 283 | 283 | $node->getValues(), |
| 284 | - function (EnumValueDefinitionNode $value): string { |
|
| 284 | + function(EnumValueDefinitionNode $value): string { |
|
| 285 | 285 | return $value->getNameValue(); |
| 286 | 286 | }, |
| 287 | - function (EnumValueDefinitionNode $value): array { |
|
| 287 | + function(EnumValueDefinitionNode $value): array { |
|
| 288 | 288 | return [ |
| 289 | 289 | 'description' => $value->getDescriptionValue(), |
| 290 | 290 | 'deprecationReason' => getDeprecationReason($value), |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | return GraphQLUnionType([ |
| 302 | 302 | 'name' => $node->getNameValue(), |
| 303 | 303 | 'description' => $node->getDescriptionValue(), |
| 304 | - 'types' => $node->hasTypes() ? array_map(function (TypeNodeInterface $type) { |
|
| 304 | + 'types' => $node->hasTypes() ? array_map(function(TypeNodeInterface $type) { |
|
| 305 | 305 | return $this->buildType($type); |
| 306 | 306 | }, $node->getTypes()) : [], |
| 307 | 307 | 'astNode' => $node, |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | return GraphQLScalarType([ |
| 318 | 318 | 'name' => $node->getNameValue(), |
| 319 | 319 | 'description' => $node->getDescriptionValue(), |
| 320 | - 'serialize' => function ($value) { |
|
| 320 | + 'serialize' => function($value) { |
|
| 321 | 321 | return $value; |
| 322 | 322 | }, |
| 323 | 323 | 'astNode' => $node, |
@@ -335,10 +335,10 @@ discard block |
||
| 335 | 335 | 'description' => $node->getDescriptionValue(), |
| 336 | 336 | 'fields' => $node->hasFields() ? keyValMap( |
| 337 | 337 | $node->getFields(), |
| 338 | - function (InputValueDefinitionNode $value): string { |
|
| 338 | + function(InputValueDefinitionNode $value): string { |
|
| 339 | 339 | return $value->getNameValue(); |
| 340 | 340 | }, |
| 341 | - function (InputValueDefinitionNode $value): array { |
|
| 341 | + function(InputValueDefinitionNode $value): array { |
|
| 342 | 342 | $type = $this->buildWrappedType($value->getType()); |
| 343 | 343 | return [ |
| 344 | 344 | 'type' => $type, |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return $coercedValues; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - $argumentNodeMap = keyMap($argumentNodes, function (ArgumentNode $value) { |
|
| 38 | + $argumentNodeMap = keyMap($argumentNodes, function(ArgumentNode $value) { |
|
| 39 | 39 | return $value->getNameValue(); |
| 40 | 40 | }); |
| 41 | 41 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | function getDirectiveValues(DirectiveInterface $directive, NodeInterface $node, array $variableValues = []): ?array |
| 106 | 106 | { |
| 107 | 107 | $directiveNode = $node->hasDirectives() |
| 108 | - ? find($node->getDirectives(), function (NamedTypeNode $value) use ($directive) { |
|
| 108 | + ? find($node->getDirectives(), function(NamedTypeNode $value) use ($directive) { |
|
| 109 | 109 | return $value->getNameValue() === $directive->getName(); |
| 110 | 110 | }) : null; |
| 111 | 111 | |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | $coercedObject = []; |
| 102 | 102 | |
| 103 | 103 | /** @var ObjectFieldNode[] $fieldNodes */ |
| 104 | - $fieldNodes = keyMap($node->getFields(), function (FieldNode $value) { |
|
| 104 | + $fieldNodes = keyMap($node->getFields(), function(FieldNode $value) { |
|
| 105 | 105 | return $value->getNameValue(); |
| 106 | 106 | }); |
| 107 | 107 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function getValuesAsArray(): array |
| 34 | 34 | { |
| 35 | - return array_map(function (SerializationInterface $node) { |
|
| 35 | + return array_map(function(SerializationInterface $node) { |
|
| 36 | 36 | return $node->toArray(); |
| 37 | 37 | }, $this->values); |
| 38 | 38 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function getTypesAsArray(): array |
| 28 | 28 | { |
| 29 | - return array_map(function (SerializationInterface $node) { |
|
| 29 | + return array_map(function(SerializationInterface $node) { |
|
| 30 | 30 | return $node->toArray(); |
| 31 | 31 | }, $this->types); |
| 32 | 32 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function getInterfacesAsArray(): array |
| 28 | 28 | { |
| 29 | - return array_map(function (SerializationInterface $node) { |
|
| 29 | + return array_map(function(SerializationInterface $node) { |
|
| 30 | 30 | return $node->toArray(); |
| 31 | 31 | }, $this->interfaces); |
| 32 | 32 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function getVariableDefinitionsAsArray(): array |
| 28 | 28 | { |
| 29 | - return array_map(function (SerializationInterface $node) { |
|
| 29 | + return array_map(function(SerializationInterface $node) { |
|
| 30 | 30 | return $node->toArray(); |
| 31 | 31 | }, $this->variableDefinitions); |
| 32 | 32 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function getFieldsAsArray(): array |
| 28 | 28 | { |
| 29 | - return array_map(function (SerializationInterface $node) { |
|
| 29 | + return array_map(function(SerializationInterface $node) { |
|
| 30 | 30 | return $node->toArray(); |
| 31 | 31 | }, $this->fields); |
| 32 | 32 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function getFieldsAsArray(): array |
| 28 | 28 | { |
| 29 | - return array_map(function (SerializationInterface $node) { |
|
| 29 | + return array_map(function(SerializationInterface $node) { |
|
| 30 | 30 | return $node->toArray(); |
| 31 | 31 | }, $this->fields); |
| 32 | 32 | } |