@@ -257,7 +257,7 @@ |
||
| 257 | 257 | return conflictReasonMessage([$reason]); |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | - return implode(' and ', array_map(function ($reason) { |
|
| 260 | + return implode(' and ', array_map(function($reason) { |
|
| 261 | 261 | [$responseName, $subreason] = $reason; |
| 262 | 262 | return sprintf('subfields "%s" conflict because %s', $responseName, |
| 263 | 263 | conflictReasonMessage($subreason)); |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | $this->schema = $schema; |
| 82 | 82 | $this->getFieldDefinitionFunction = null !== $getFieldDefinitionFunction |
| 83 | 83 | ? $getFieldDefinitionFunction |
| 84 | - : function ( |
|
| 84 | + : function( |
|
| 85 | 85 | SchemaInterface $schema, |
| 86 | 86 | TypeInterface $parentType, |
| 87 | 87 | FieldNode $fieldNode |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | // If both types are abstract, then determine if there is any intersection |
| 142 | 142 | // between possible concrete types of each. |
| 143 | 143 | return arraySome($schema->getPossibleTypes($typeA), |
| 144 | - function (TypeInterface $type) use ($schema, $typeB) { |
|
| 144 | + function(TypeInterface $type) use ($schema, $typeB) { |
|
| 145 | 145 | return $schema->isPossibleType($typeB, $type); |
| 146 | 146 | }); |
| 147 | 147 | } |
@@ -39,9 +39,9 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | return arrayEvery($argumentsA, |
| 42 | - function (ArgumentNode $argumentA) use ($argumentsB) { |
|
| 42 | + function(ArgumentNode $argumentA) use ($argumentsB) { |
|
| 43 | 43 | $argumentB = find($argumentsB, |
| 44 | - function (ArgumentNode $argument) use ($argumentA) { |
|
| 44 | + function(ArgumentNode $argument) use ($argumentA) { |
|
| 45 | 45 | return $argument->getNameValue() === $argumentA->getNameValue(); |
| 46 | 46 | }); |
| 47 | 47 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | |
| 245 | 245 | /** @var ObjectFieldNode[] $fieldNodes */ |
| 246 | 246 | $fieldNodes = keyMap($node->getFields(), |
| 247 | - function (ObjectFieldNode $value) { |
|
| 247 | + function(ObjectFieldNode $value) { |
|
| 248 | 248 | return $value->getNameValue(); |
| 249 | 249 | }); |
| 250 | 250 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | return $count === 1 |
| 39 | 39 | ? $selected[0] |
| 40 | - : \array_reduce($selected, function ($list, $item) use ($count, &$index) { |
|
| 40 | + : \array_reduce($selected, function($list, $item) use ($count, &$index) { |
|
| 41 | 41 | $list .= ($index > 0 && $index < ($count - 1) ? ', ' : '') . ($index === ($count - 1) ? ' or ' : '') . |
| 42 | 42 | $item; |
| 43 | 43 | $index++; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $result = \array_keys($optionsByDistance); |
| 75 | 75 | |
| 76 | - \usort($result, function ($a, $b) use ($optionsByDistance) { |
|
| 76 | + \usort($result, function($a, $b) use ($optionsByDistance) { |
|
| 77 | 77 | return $optionsByDistance[$a] - $optionsByDistance[$b]; |
| 78 | 78 | }); |
| 79 | 79 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | function quotedOrList(array $items): string |
| 91 | 91 | { |
| 92 | - return orList(array_map(function ($item) { |
|
| 92 | + return orList(array_map(function($item) { |
|
| 93 | 93 | return '"' . $item . '"'; |
| 94 | 94 | }, $items)); |
| 95 | 95 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | function arrayEvery(array $array, callable $fn): bool |
| 105 | 105 | { |
| 106 | - return array_reduce($array, function ($result, $value) use ($fn) { |
|
| 106 | + return array_reduce($array, function($result, $value) use ($fn) { |
|
| 107 | 107 | return $result && $fn($value); |
| 108 | 108 | }, true); |
| 109 | 109 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | function arraySome(array $array, callable $fn) |
| 118 | 118 | { |
| 119 | - return array_reduce($array, function ($result, $value) use ($fn) { |
|
| 119 | + return array_reduce($array, function($result, $value) use ($fn) { |
|
| 120 | 120 | return $result || $fn($value); |
| 121 | 121 | }); |
| 122 | 122 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | function keyMap(array $array, callable $keyFn): array |
| 148 | 148 | { |
| 149 | - return array_reduce($array, function ($map, $item) use ($keyFn) { |
|
| 149 | + return array_reduce($array, function($map, $item) use ($keyFn) { |
|
| 150 | 150 | $map[$keyFn($item)] = $item; |
| 151 | 151 | return $map; |
| 152 | 152 | }, []); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | function keyValueMap(array $array, callable $keyFn, callable $valFn): array |
| 163 | 163 | { |
| 164 | - return array_reduce($array, function ($map, $item) use ($keyFn, $valFn) { |
|
| 164 | + return array_reduce($array, function($map, $item) use ($keyFn, $valFn) { |
|
| 165 | 165 | $map[$keyFn($item)] = $valFn($item); |
| 166 | 166 | return $map; |
| 167 | 167 | }, []); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | $directiveNode = $node->hasDirectives() |
| 59 | 59 | ? find($node->getDirectives(), |
| 60 | - function (NameAwareInterface $value) use ($directive) { |
|
| 60 | + function(NameAwareInterface $value) use ($directive) { |
|
| 61 | 61 | return $value->getNameValue() === $directive->getName(); |
| 62 | 62 | }) : null; |
| 63 | 63 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | $argumentNodeMap = keyMap($argumentNodes, |
| 101 | - function (ArgumentNode $value) { |
|
| 101 | + function(ArgumentNode $value) { |
|
| 102 | 102 | return $value->getNameValue(); |
| 103 | 103 | }); |
| 104 | 104 | |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | ]); |
| 460 | 460 | } |
| 461 | 461 | return new CoercedValue($parseResult, null); |
| 462 | - } catch (InvalidTypeException|CoercingException $ex) { |
|
| 462 | + } catch (InvalidTypeException | CoercingException $ex) { |
|
| 463 | 463 | return new CoercedValue(null, [ |
| 464 | 464 | $this->buildCoerceException( |
| 465 | 465 | sprintf('Expected type %s', (string)$type), |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | $suggestions = suggestionList((string)$value, |
| 498 | - array_map(function (EnumValue $enumValue) { |
|
| 498 | + array_map(function(EnumValue $enumValue) { |
|
| 499 | 499 | return $enumValue->getName(); |
| 500 | 500 | }, $type->getValues())); |
| 501 | 501 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | $promise = new \React\Promise\FulfilledPromise([]); |
| 154 | 154 | |
| 155 | - $resolve = function ( |
|
| 155 | + $resolve = function( |
|
| 156 | 156 | $results, |
| 157 | 157 | $fieldName, |
| 158 | 158 | $path, |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | if ($this->isPromise($result)) { |
| 173 | 173 | /** @var ExtendedPromiseInterface $result */ |
| 174 | - return $result->then(function ($resolvedResult) use ( |
|
| 174 | + return $result->then(function($resolvedResult) use ( |
|
| 175 | 175 | $fieldName, |
| 176 | 176 | $results |
| 177 | 177 | ) { |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | }; |
| 187 | 187 | |
| 188 | 188 | foreach ($fields as $fieldName => $fieldNodes) { |
| 189 | - $promise = $promise->then(function ($resolvedResults) use ( |
|
| 189 | + $promise = $promise->then(function($resolvedResults) use ( |
|
| 190 | 190 | $resolve, |
| 191 | 191 | $fieldName, |
| 192 | 192 | $path, |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | }); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | - $promise->then(function ($resolvedResults) use (&$finalResults) { |
|
| 202 | + $promise->then(function($resolvedResults) use (&$finalResults) { |
|
| 203 | 203 | $finalResults = $resolvedResults ?? []; |
| 204 | 204 | }); |
| 205 | 205 | |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | if ($isContainsPromise) { |
| 250 | 250 | $keys = array_keys($finalResults); |
| 251 | 251 | $promise = \React\Promise\all(array_values($finalResults)); |
| 252 | - $promise->then(function ($values) use ($keys, &$finalResults) { |
|
| 252 | + $promise->then(function($values) use ($keys, &$finalResults) { |
|
| 253 | 253 | foreach ($values as $i => $value) { |
| 254 | 254 | $finalResults[$keys[$i]] = $value; |
| 255 | 255 | } |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | $context = $this->context; |
| 474 | 474 | /** @var ExtendedPromiseInterface $completed */ |
| 475 | 475 | return $completed->then(null, |
| 476 | - function ($error) use ($context, $fieldNodes, $path) { |
|
| 476 | + function($error) use ($context, $fieldNodes, $path) { |
|
| 477 | 477 | //@TODO Handle $error better |
| 478 | 478 | if ($error instanceof \Exception) { |
| 479 | 479 | $context->addError($this->buildLocatedError($error, |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | ) { |
| 554 | 554 | if ($this->isPromise($result)) { |
| 555 | 555 | /** @var ExtendedPromiseInterface $result */ |
| 556 | - return $result->then(function (&$value) use ( |
|
| 556 | + return $result->then(function(&$value) use ( |
|
| 557 | 557 | $returnType, |
| 558 | 558 | $fieldNodes, |
| 559 | 559 | $info, |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | |
| 730 | 730 | if ($this->isPromise($runtimeType)) { |
| 731 | 731 | /** @var ExtendedPromiseInterface $runtimeType */ |
| 732 | - return $runtimeType->then(function ($resolvedRuntimeType) use ( |
|
| 732 | + return $runtimeType->then(function($resolvedRuntimeType) use ( |
|
| 733 | 733 | $returnType, |
| 734 | 734 | $fieldNodes, |
| 735 | 735 | $info, |
@@ -808,7 +808,7 @@ discard block |
||
| 808 | 808 | |
| 809 | 809 | if (!empty($promisedIsTypeOfResults)) { |
| 810 | 810 | return \React\Promise\all($promisedIsTypeOfResults) |
| 811 | - ->then(function ($isTypeOfResults) use ($possibleTypes) { |
|
| 811 | + ->then(function($isTypeOfResults) use ($possibleTypes) { |
|
| 812 | 812 | foreach ($isTypeOfResults as $index => $result) { |
| 813 | 813 | if ($result) { |
| 814 | 814 | return $possibleTypes[$index]; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | protected function registerIntrospectionTypes() |
| 60 | 60 | { |
| 61 | - $this->container->add(GraphQL::SCHEMA_INTROSPECTION, function () { |
|
| 61 | + $this->container->add(GraphQL::SCHEMA_INTROSPECTION, function() { |
|
| 62 | 62 | return newObjectType([ |
| 63 | 63 | 'name' => GraphQL::SCHEMA_INTROSPECTION, |
| 64 | 64 | 'isIntrospection' => true, |
@@ -66,19 +66,19 @@ discard block |
||
| 66 | 66 | 'A GraphQL Schema defines the capabilities of a GraphQL server. It ' . |
| 67 | 67 | 'exposes all available types and directives on the server, as well as ' . |
| 68 | 68 | 'the entry points for query, mutation, and subscription operations.', |
| 69 | - 'fields' => function () { |
|
| 69 | + 'fields' => function() { |
|
| 70 | 70 | return [ |
| 71 | 71 | 'types' => [ |
| 72 | 72 | 'description' => 'A list of all types supported by this server.', |
| 73 | 73 | 'type' => newNonNull(newList(newNonNull(__Type()))), |
| 74 | - 'resolve' => function (SchemaInterface $schema): array { |
|
| 74 | + 'resolve' => function(SchemaInterface $schema): array { |
|
| 75 | 75 | return array_values($schema->getTypeMap()); |
| 76 | 76 | }, |
| 77 | 77 | ], |
| 78 | 78 | 'queryType' => [ |
| 79 | 79 | 'description' => 'The type that query operations will be rooted at.', |
| 80 | 80 | 'type' => newNonNull(__Type()), |
| 81 | - 'resolve' => function (SchemaInterface $schema |
|
| 81 | + 'resolve' => function(SchemaInterface $schema |
|
| 82 | 82 | ): ?TypeInterface { |
| 83 | 83 | return $schema->getQueryType(); |
| 84 | 84 | }, |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | 'If this server supports mutation, the type that ' . |
| 89 | 89 | 'mutation operations will be rooted at.', |
| 90 | 90 | 'type' => __Type(), |
| 91 | - 'resolve' => function (SchemaInterface $schema |
|
| 91 | + 'resolve' => function(SchemaInterface $schema |
|
| 92 | 92 | ): ?TypeInterface { |
| 93 | 93 | return $schema->getMutationType(); |
| 94 | 94 | }, |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | 'If this server support subscription, the type that ' . |
| 99 | 99 | 'subscription operations will be rooted at.', |
| 100 | 100 | 'type' => __Type(), |
| 101 | - 'resolve' => function (SchemaInterface $schema |
|
| 101 | + 'resolve' => function(SchemaInterface $schema |
|
| 102 | 102 | ): ?TypeInterface { |
| 103 | 103 | return $schema->getSubscriptionType(); |
| 104 | 104 | }, |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | 'directives' => [ |
| 107 | 107 | 'description' => 'A list of all directives supported by this server.', |
| 108 | 108 | 'type' => newNonNull(newList(newNonNull(__Directive()))), |
| 109 | - 'resolve' => function (SchemaInterface $schema): array { |
|
| 109 | + 'resolve' => function(SchemaInterface $schema): array { |
|
| 110 | 110 | return $schema->getDirectives(); |
| 111 | 111 | }, |
| 112 | 112 | ], |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ]); |
| 116 | 116 | }, true/* $shared */); |
| 117 | 117 | |
| 118 | - $this->container->add(GraphQL::DIRECTIVE_INTROSPECTION, function () { |
|
| 118 | + $this->container->add(GraphQL::DIRECTIVE_INTROSPECTION, function() { |
|
| 119 | 119 | return newObjectType([ |
| 120 | 120 | 'name' => GraphQL::DIRECTIVE_INTROSPECTION, |
| 121 | 121 | 'isIntrospection' => true, |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | 'execution behavior in ways field arguments will not suffice, such as ' . |
| 127 | 127 | 'conditionally including or skipping a field. Directives provide this by ' . |
| 128 | 128 | 'describing additional information to the executor.', |
| 129 | - 'fields' => function () { |
|
| 129 | + 'fields' => function() { |
|
| 130 | 130 | return [ |
| 131 | 131 | 'name' => ['type' => newNonNull(String())], |
| 132 | 132 | 'description' => ['type' => String()], |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | ], |
| 136 | 136 | 'args' => [ |
| 137 | 137 | 'type' => newNonNull(newList(newNonNull(__InputValue()))), |
| 138 | - 'resolve' => function (DirectiveInterface $directive |
|
| 138 | + 'resolve' => function(DirectiveInterface $directive |
|
| 139 | 139 | ): array { |
| 140 | 140 | return $directive->getArguments() ?: []; |
| 141 | 141 | }, |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | }, true/* $shared */); |
| 147 | 147 | |
| 148 | 148 | $this->container->add(GraphQL::DIRECTIVE_LOCATION_INTROSPECTION, |
| 149 | - function () { |
|
| 149 | + function() { |
|
| 150 | 150 | return newEnumType([ |
| 151 | 151 | 'name' => GraphQL::DIRECTIVE_LOCATION_INTROSPECTION, |
| 152 | 152 | 'isIntrospection' => true, |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | ]); |
| 213 | 213 | }, true/* $shared */); |
| 214 | 214 | |
| 215 | - $this->container->add(GraphQL::TYPE_INTROSPECTION, function () { |
|
| 215 | + $this->container->add(GraphQL::TYPE_INTROSPECTION, function() { |
|
| 216 | 216 | return newObjectType([ |
| 217 | 217 | 'name' => GraphQL::TYPE_INTROSPECTION, |
| 218 | 218 | 'isIntrospection' => true, |
@@ -225,11 +225,11 @@ discard block |
||
| 225 | 225 | 'Object and Interface types provide the fields they describe. Abstract ' . |
| 226 | 226 | 'types, Union and Interface, provide the Object types possible ' . |
| 227 | 227 | 'at runtime. List and NonNull types compose other types.', |
| 228 | - 'fields' => function () { |
|
| 228 | + 'fields' => function() { |
|
| 229 | 229 | return [ |
| 230 | 230 | 'kind' => [ |
| 231 | 231 | 'type' => newNonNull(__TypeKind()), |
| 232 | - 'resolve' => function (TypeInterface $type) { |
|
| 232 | + 'resolve' => function(TypeInterface $type) { |
|
| 233 | 233 | if ($type instanceof ScalarType) { |
| 234 | 234 | return TypeKindEnum::SCALAR; |
| 235 | 235 | } |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | 'defaultValue' => false, |
| 270 | 270 | ], |
| 271 | 271 | ], |
| 272 | - 'resolve' => function (TypeInterface $type, array $args): |
|
| 272 | + 'resolve' => function(TypeInterface $type, array $args): |
|
| 273 | 273 | ?array { |
| 274 | 274 | ['includeDeprecated' => $includeDeprecated] = $args; |
| 275 | 275 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | |
| 279 | 279 | if (!$includeDeprecated) { |
| 280 | 280 | $fields = array_filter($fields, |
| 281 | - function (Field $field) { |
|
| 281 | + function(Field $field) { |
|
| 282 | 282 | return !$field->getIsDeprecated(); |
| 283 | 283 | }); |
| 284 | 284 | } |
@@ -291,13 +291,13 @@ discard block |
||
| 291 | 291 | ], |
| 292 | 292 | 'interfaces' => [ |
| 293 | 293 | 'type' => newList(newNonNull(__Type())), |
| 294 | - 'resolve' => function (TypeInterface $type): ?array { |
|
| 294 | + 'resolve' => function(TypeInterface $type): ?array { |
|
| 295 | 295 | return $type instanceof ObjectType ? $type->getInterfaces() : null; |
| 296 | 296 | }, |
| 297 | 297 | ], |
| 298 | 298 | 'possibleTypes' => [ |
| 299 | 299 | 'type' => newList(newNonNull(__Type())), |
| 300 | - 'resolve' => function ( |
|
| 300 | + 'resolve' => function( |
|
| 301 | 301 | TypeInterface $type, |
| 302 | 302 | array $args, |
| 303 | 303 | array $context, |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | 'defaultValue' => false, |
| 319 | 319 | ], |
| 320 | 320 | ], |
| 321 | - 'resolve' => function ( |
|
| 321 | + 'resolve' => function( |
|
| 322 | 322 | TypeInterface $type, |
| 323 | 323 | array $args |
| 324 | 324 | ): ?array { |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | |
| 330 | 330 | if (!$includeDeprecated) { |
| 331 | 331 | $values = array_filter($values, |
| 332 | - function (Field $field) { |
|
| 332 | + function(Field $field) { |
|
| 333 | 333 | return !$field->getIsDeprecated(); |
| 334 | 334 | }); |
| 335 | 335 | } |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | ], |
| 343 | 343 | 'inputFields' => [ |
| 344 | 344 | 'type' => newList(newNonNull(__InputValue())), |
| 345 | - 'resolve' => function (TypeInterface $type): ?array { |
|
| 345 | + 'resolve' => function(TypeInterface $type): ?array { |
|
| 346 | 346 | return $type instanceof InputObjectType ? $type->getFields() : null; |
| 347 | 347 | }, |
| 348 | 348 | ], |
@@ -352,20 +352,20 @@ discard block |
||
| 352 | 352 | ]); |
| 353 | 353 | }, true/* $shared */); |
| 354 | 354 | |
| 355 | - $this->container->add(GraphQL::FIELD_INTROSPECTION, function () { |
|
| 355 | + $this->container->add(GraphQL::FIELD_INTROSPECTION, function() { |
|
| 356 | 356 | return newObjectType([ |
| 357 | 357 | 'name' => GraphQL::FIELD_INTROSPECTION, |
| 358 | 358 | 'isIntrospection' => true, |
| 359 | 359 | 'description' => |
| 360 | 360 | 'Object and Interface types are described by a list of Fields, each of ' . |
| 361 | 361 | 'which has a name, potentially a list of arguments, and a return type.', |
| 362 | - 'fields' => function () { |
|
| 362 | + 'fields' => function() { |
|
| 363 | 363 | return [ |
| 364 | 364 | 'name' => ['type' => newNonNull(String())], |
| 365 | 365 | 'description' => ['type' => String()], |
| 366 | 366 | 'args' => [ |
| 367 | 367 | 'type' => newNonNull(newList(newNonNull(__InputValue()))), |
| 368 | - 'resolve' => function (ArgumentsAwareInterface $directive |
|
| 368 | + 'resolve' => function(ArgumentsAwareInterface $directive |
|
| 369 | 369 | ): array { |
| 370 | 370 | return $directive->getArguments() ?? []; |
| 371 | 371 | }, |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | ]); |
| 379 | 379 | }, true/* $shared */); |
| 380 | 380 | |
| 381 | - $this->container->add(GraphQL::INPUT_VALUE_INTROSPECTION, function () { |
|
| 381 | + $this->container->add(GraphQL::INPUT_VALUE_INTROSPECTION, function() { |
|
| 382 | 382 | return newObjectType([ |
| 383 | 383 | 'name' => GraphQL::INPUT_VALUE_INTROSPECTION, |
| 384 | 384 | 'isIntrospection' => true, |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | 'Arguments provided to Fields or Directives and the input fields of an ' . |
| 387 | 387 | 'InputObject are represented as Input Values which describe their type ' . |
| 388 | 388 | 'and optionally a default value.', |
| 389 | - 'fields' => function () { |
|
| 389 | + 'fields' => function() { |
|
| 390 | 390 | return [ |
| 391 | 391 | 'name' => ['type' => newNonNull(String())], |
| 392 | 392 | 'description' => ['type' => String()], |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | 'description' => |
| 397 | 397 | 'A GraphQL-formatted string representing the default value for this ' . |
| 398 | 398 | 'input value.', |
| 399 | - 'resolve' => function ($inputValue) { |
|
| 399 | + 'resolve' => function($inputValue) { |
|
| 400 | 400 | // TODO: Implement this when we have support for printing AST. |
| 401 | 401 | return null; |
| 402 | 402 | }, |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | ]); |
| 407 | 407 | }, true/* $shared */); |
| 408 | 408 | |
| 409 | - $this->container->add(GraphQL::ENUM_VALUE_INTROSPECTION, function () { |
|
| 409 | + $this->container->add(GraphQL::ENUM_VALUE_INTROSPECTION, function() { |
|
| 410 | 410 | return newObjectType([ |
| 411 | 411 | 'name' => GraphQL::ENUM_VALUE_INTROSPECTION, |
| 412 | 412 | 'isIntrospection' => true, |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | 'One possible value for a given Enum. Enum values are unique values, not ' . |
| 415 | 415 | 'a placeholder for a string or numeric value. However an Enum value is ' . |
| 416 | 416 | 'returned in a JSON response as a string.', |
| 417 | - 'fields' => function () { |
|
| 417 | + 'fields' => function() { |
|
| 418 | 418 | return [ |
| 419 | 419 | 'name' => ['type' => newNonNull(String())], |
| 420 | 420 | 'description' => ['type' => String()], |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | ]); |
| 426 | 426 | }, true/* $shared */); |
| 427 | 427 | |
| 428 | - $this->container->add(GraphQL::TYPE_KIND_INTROSPECTION, function () { |
|
| 428 | + $this->container->add(GraphQL::TYPE_KIND_INTROSPECTION, function() { |
|
| 429 | 429 | return newEnumType([ |
| 430 | 430 | 'name' => GraphQL::TYPE_KIND_INTROSPECTION, |
| 431 | 431 | 'isIntrospection' => true, |
@@ -466,12 +466,12 @@ discard block |
||
| 466 | 466 | protected function registerMetaFields() |
| 467 | 467 | { |
| 468 | 468 | $this->container->add(GraphQL::SCHEMA_META_FIELD_DEFINITION, |
| 469 | - function ($__Schema) { |
|
| 469 | + function($__Schema) { |
|
| 470 | 470 | return new Field([ |
| 471 | 471 | 'name' => '__schema', |
| 472 | 472 | 'type' => newNonNull($__Schema), |
| 473 | 473 | 'description' => 'Access the current type schema of this server.', |
| 474 | - 'resolve' => function ( |
|
| 474 | + 'resolve' => function( |
|
| 475 | 475 | $source, |
| 476 | 476 | $args, |
| 477 | 477 | $context, |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | ->withArgument(GraphQL::SCHEMA_INTROSPECTION); |
| 485 | 485 | |
| 486 | 486 | $this->container->add(GraphQL::TYPE_META_FIELD_DEFINITION, |
| 487 | - function ($__Type) { |
|
| 487 | + function($__Type) { |
|
| 488 | 488 | return new Field([ |
| 489 | 489 | 'name' => '__type', |
| 490 | 490 | 'type' => $__Type, |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | 'args' => [ |
| 493 | 493 | 'name' => ['type' => newNonNull(String())], |
| 494 | 494 | ], |
| 495 | - 'resolve' => function ( |
|
| 495 | + 'resolve' => function( |
|
| 496 | 496 | $source, |
| 497 | 497 | $args, |
| 498 | 498 | $context, |
@@ -507,12 +507,12 @@ discard block |
||
| 507 | 507 | ->withArgument(GraphQL::TYPE_INTROSPECTION); |
| 508 | 508 | |
| 509 | 509 | $this->container->add(GraphQL::TYPE_NAME_META_FIELD_DEFINITION, |
| 510 | - function () { |
|
| 510 | + function() { |
|
| 511 | 511 | return new Field([ |
| 512 | 512 | 'name' => '__typename', |
| 513 | 513 | 'type' => newNonNull(String()), |
| 514 | 514 | 'description' => 'The name of the current Object type at runtime.', |
| 515 | - 'resolve' => function ( |
|
| 515 | + 'resolve' => function( |
|
| 516 | 516 | $source, |
| 517 | 517 | $args, |
| 518 | 518 | $context, |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | { |
| 53 | 53 | return arraySome( |
| 54 | 54 | specifiedDirectives(), |
| 55 | - function (DirectiveInterface $specifiedDirective) use ($directive) { |
|
| 55 | + function(DirectiveInterface $specifiedDirective) use ($directive) { |
|
| 56 | 56 | return $specifiedDirective->getName() === $directive->getName(); |
| 57 | 57 | } |
| 58 | 58 | ); |