@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | protected function registerIntrospectionTypes() |
| 59 | 59 | { |
| 60 | 60 | $this->container |
| 61 | - ->share(GraphQL::SCHEMA_INTROSPECTION, function () { |
|
| 61 | + ->share(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 (Schema $schema): array { |
|
| 74 | + 'resolve' => function(Schema $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 (Schema $schema): ?TypeInterface { |
|
| 81 | + 'resolve' => function(Schema $schema): ?TypeInterface { |
|
| 82 | 82 | return $schema->getQueryType(); |
| 83 | 83 | }, |
| 84 | 84 | ], |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | 'If this server supports mutation, the type that ' . |
| 88 | 88 | 'mutation operations will be rooted at.', |
| 89 | 89 | 'type' => __Type(), |
| 90 | - 'resolve' => function (Schema $schema): ?TypeInterface { |
|
| 90 | + 'resolve' => function(Schema $schema): ?TypeInterface { |
|
| 91 | 91 | return $schema->getMutationType(); |
| 92 | 92 | }, |
| 93 | 93 | ], |
@@ -96,14 +96,14 @@ discard block |
||
| 96 | 96 | 'If this server support subscription, the type that ' . |
| 97 | 97 | 'subscription operations will be rooted at.', |
| 98 | 98 | 'type' => __Type(), |
| 99 | - 'resolve' => function (Schema $schema): ?TypeInterface { |
|
| 99 | + 'resolve' => function(Schema $schema): ?TypeInterface { |
|
| 100 | 100 | return $schema->getSubscriptionType(); |
| 101 | 101 | }, |
| 102 | 102 | ], |
| 103 | 103 | 'directives' => [ |
| 104 | 104 | 'description' => 'A list of all directives supported by this server.', |
| 105 | 105 | 'type' => newNonNull(newList(newNonNull(__Directive()))), |
| 106 | - 'resolve' => function (Schema $schema): array { |
|
| 106 | + 'resolve' => function(Schema $schema): array { |
|
| 107 | 107 | return $schema->getDirectives(); |
| 108 | 108 | }, |
| 109 | 109 | ], |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | }); |
| 114 | 114 | |
| 115 | 115 | $this->container |
| 116 | - ->share(GraphQL::DIRECTIVE_INTROSPECTION, function () { |
|
| 116 | + ->share(GraphQL::DIRECTIVE_INTROSPECTION, function() { |
|
| 117 | 117 | return newObjectType([ |
| 118 | 118 | 'name' => GraphQL::DIRECTIVE_INTROSPECTION, |
| 119 | 119 | 'isIntrospection' => true, |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | 'execution behavior in ways field arguments will not suffice, such as ' . |
| 125 | 125 | 'conditionally including or skipping a field. Directives provide this by ' . |
| 126 | 126 | 'describing additional information to the executor.', |
| 127 | - 'fields' => function () { |
|
| 127 | + 'fields' => function() { |
|
| 128 | 128 | return [ |
| 129 | 129 | 'name' => ['type' => newNonNull(stringType())], |
| 130 | 130 | 'description' => ['type' => stringType()], |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | ], |
| 134 | 134 | 'args' => [ |
| 135 | 135 | 'type' => newNonNull(newList(newNonNull(__InputValue()))), |
| 136 | - 'resolve' => function (Directive $directive): array { |
|
| 136 | + 'resolve' => function(Directive $directive): array { |
|
| 137 | 137 | return $directive->getArguments() ?: []; |
| 138 | 138 | }, |
| 139 | 139 | ], |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | }); |
| 144 | 144 | |
| 145 | 145 | $this->container |
| 146 | - ->share(GraphQL::DIRECTIVE_LOCATION_INTROSPECTION, function () { |
|
| 146 | + ->share(GraphQL::DIRECTIVE_LOCATION_INTROSPECTION, function() { |
|
| 147 | 147 | return newEnumType([ |
| 148 | 148 | 'name' => GraphQL::DIRECTIVE_LOCATION_INTROSPECTION, |
| 149 | 149 | 'isIntrospection' => true, |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | }); |
| 211 | 211 | |
| 212 | 212 | $this->container |
| 213 | - ->share(GraphQL::TYPE_INTROSPECTION, function () { |
|
| 213 | + ->share(GraphQL::TYPE_INTROSPECTION, function() { |
|
| 214 | 214 | return newObjectType([ |
| 215 | 215 | 'name' => GraphQL::TYPE_INTROSPECTION, |
| 216 | 216 | 'isIntrospection' => true, |
@@ -223,11 +223,11 @@ discard block |
||
| 223 | 223 | 'Object and Interface types provide the fields they describe. Abstract ' . |
| 224 | 224 | 'types, Union and Interface, provide the Object types possible ' . |
| 225 | 225 | 'at runtime. List and NonNull types compose other types.', |
| 226 | - 'fields' => function () { |
|
| 226 | + 'fields' => function() { |
|
| 227 | 227 | return [ |
| 228 | 228 | 'kind' => [ |
| 229 | 229 | 'type' => newNonNull(__TypeKind()), |
| 230 | - 'resolve' => function (TypeInterface $type) { |
|
| 230 | + 'resolve' => function(TypeInterface $type) { |
|
| 231 | 231 | if ($type instanceof ScalarType) { |
| 232 | 232 | return TypeKindEnum::SCALAR; |
| 233 | 233 | } |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | 'args' => [ |
| 264 | 264 | 'includeDeprecated' => ['type' => booleanType(), 'defaultValue' => false], |
| 265 | 265 | ], |
| 266 | - 'resolve' => function (TypeInterface $type, array $args): |
|
| 266 | + 'resolve' => function(TypeInterface $type, array $args): |
|
| 267 | 267 | ?array { |
| 268 | 268 | ['includeDeprecated' => $includeDeprecated] = $args; |
| 269 | 269 | |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | $fields = \array_values($type->getFields()); |
| 272 | 272 | |
| 273 | 273 | if (!$includeDeprecated) { |
| 274 | - $fields = \array_filter($fields, function (Field $field) { |
|
| 274 | + $fields = \array_filter($fields, function(Field $field) { |
|
| 275 | 275 | return !$field->isDeprecated(); |
| 276 | 276 | }); |
| 277 | 277 | } |
@@ -284,13 +284,13 @@ discard block |
||
| 284 | 284 | ], |
| 285 | 285 | 'interfaces' => [ |
| 286 | 286 | 'type' => newList(newNonNull(__Type())), |
| 287 | - 'resolve' => function (TypeInterface $type): ?array { |
|
| 287 | + 'resolve' => function(TypeInterface $type): ?array { |
|
| 288 | 288 | return $type instanceof ObjectType ? $type->getInterfaces() : null; |
| 289 | 289 | }, |
| 290 | 290 | ], |
| 291 | 291 | 'possibleTypes' => [ |
| 292 | 292 | 'type' => newList(newNonNull(__Type())), |
| 293 | - 'resolve' => function ( |
|
| 293 | + 'resolve' => function( |
|
| 294 | 294 | TypeInterface $type, |
| 295 | 295 | array $args, |
| 296 | 296 | array $context, |
@@ -308,14 +308,14 @@ discard block |
||
| 308 | 308 | 'args' => [ |
| 309 | 309 | 'includeDeprecated' => ['type' => booleanType(), 'defaultValue' => false], |
| 310 | 310 | ], |
| 311 | - 'resolve' => function (TypeInterface $type, array $args): ?array { |
|
| 311 | + 'resolve' => function(TypeInterface $type, array $args): ?array { |
|
| 312 | 312 | ['includeDeprecated' => $includeDeprecated] = $args; |
| 313 | 313 | |
| 314 | 314 | if ($type instanceof EnumType) { |
| 315 | 315 | $values = \array_values($type->getValues()); |
| 316 | 316 | |
| 317 | 317 | if (!$includeDeprecated) { |
| 318 | - $values = \array_filter($values, function (Field $field) { |
|
| 318 | + $values = \array_filter($values, function(Field $field) { |
|
| 319 | 319 | return !$field->isDeprecated(); |
| 320 | 320 | }); |
| 321 | 321 | } |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | ], |
| 329 | 329 | 'inputFields' => [ |
| 330 | 330 | 'type' => newList(newNonNull(__InputValue())), |
| 331 | - 'resolve' => function (TypeInterface $type): ?array { |
|
| 331 | + 'resolve' => function(TypeInterface $type): ?array { |
|
| 332 | 332 | return $type instanceof InputObjectType ? $type->getFields() : null; |
| 333 | 333 | }, |
| 334 | 334 | ], |
@@ -339,20 +339,20 @@ discard block |
||
| 339 | 339 | }); |
| 340 | 340 | |
| 341 | 341 | $this->container |
| 342 | - ->share(GraphQL::FIELD_INTROSPECTION, function () { |
|
| 342 | + ->share(GraphQL::FIELD_INTROSPECTION, function() { |
|
| 343 | 343 | return newObjectType([ |
| 344 | 344 | 'name' => GraphQL::FIELD_INTROSPECTION, |
| 345 | 345 | 'isIntrospection' => true, |
| 346 | 346 | 'description' => |
| 347 | 347 | 'Object and Interface types are described by a list of Fields, each of ' . |
| 348 | 348 | 'which has a name, potentially a list of arguments, and a return type.', |
| 349 | - 'fields' => function () { |
|
| 349 | + 'fields' => function() { |
|
| 350 | 350 | return [ |
| 351 | 351 | 'name' => ['type' => newNonNull(stringType())], |
| 352 | 352 | 'description' => ['type' => stringType()], |
| 353 | 353 | 'args' => [ |
| 354 | 354 | 'type' => newNonNull(newList(newNonNull(__InputValue()))), |
| 355 | - 'resolve' => function (ArgumentsAwareInterface $directive): array { |
|
| 355 | + 'resolve' => function(ArgumentsAwareInterface $directive): array { |
|
| 356 | 356 | return $directive->getArguments() ?? []; |
| 357 | 357 | }, |
| 358 | 358 | ], |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | }); |
| 366 | 366 | |
| 367 | 367 | $this->container |
| 368 | - ->share(GraphQL::INPUT_VALUE_INTROSPECTION, function () { |
|
| 368 | + ->share(GraphQL::INPUT_VALUE_INTROSPECTION, function() { |
|
| 369 | 369 | return newObjectType([ |
| 370 | 370 | 'name' => GraphQL::INPUT_VALUE_INTROSPECTION, |
| 371 | 371 | 'isIntrospection' => true, |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | 'Arguments provided to Fields or Directives and the input fields of an ' . |
| 374 | 374 | 'InputObject are represented as Input Values which describe their type ' . |
| 375 | 375 | 'and optionally a default value.', |
| 376 | - 'fields' => function () { |
|
| 376 | + 'fields' => function() { |
|
| 377 | 377 | return [ |
| 378 | 378 | 'name' => ['type' => newNonNull(stringType())], |
| 379 | 379 | 'description' => ['type' => stringType()], |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | 'description' => |
| 384 | 384 | 'A GraphQL-formatted string representing the default value for this ' . |
| 385 | 385 | 'input value.', |
| 386 | - 'resolve' => function (/*$inputValue*/) { |
|
| 386 | + 'resolve' => function(/*$inputValue*/) { |
|
| 387 | 387 | // TODO: Implement this when we have support for printing AST. |
| 388 | 388 | return null; |
| 389 | 389 | } |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | }); |
| 395 | 395 | |
| 396 | 396 | $this->container |
| 397 | - ->share(GraphQL::ENUM_VALUE_INTROSPECTION, function () { |
|
| 397 | + ->share(GraphQL::ENUM_VALUE_INTROSPECTION, function() { |
|
| 398 | 398 | return newObjectType([ |
| 399 | 399 | 'name' => GraphQL::ENUM_VALUE_INTROSPECTION, |
| 400 | 400 | 'isIntrospection' => true, |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | 'One possible value for a given Enum. Enum values are unique values, not ' . |
| 403 | 403 | 'a placeholder for a string or numeric value. However an Enum value is ' . |
| 404 | 404 | 'returned in a JSON response as a string.', |
| 405 | - 'fields' => function () { |
|
| 405 | + 'fields' => function() { |
|
| 406 | 406 | return [ |
| 407 | 407 | 'name' => ['type' => newNonNull(stringType())], |
| 408 | 408 | 'description' => ['type' => stringType()], |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | }); |
| 415 | 415 | |
| 416 | 416 | $this->container |
| 417 | - ->share(GraphQL::TYPE_KIND_INTROSPECTION, function () { |
|
| 417 | + ->share(GraphQL::TYPE_KIND_INTROSPECTION, function() { |
|
| 418 | 418 | return newEnumType([ |
| 419 | 419 | 'name' => GraphQL::TYPE_KIND_INTROSPECTION, |
| 420 | 420 | 'isIntrospection' => true, |
@@ -455,12 +455,12 @@ discard block |
||
| 455 | 455 | protected function registerMetaFields() |
| 456 | 456 | { |
| 457 | 457 | $this->container |
| 458 | - ->share(GraphQL::SCHEMA_META_FIELD_DEFINITION, function ($__Schema) { |
|
| 458 | + ->share(GraphQL::SCHEMA_META_FIELD_DEFINITION, function($__Schema) { |
|
| 459 | 459 | return newField([ |
| 460 | 460 | 'name' => '__schema', |
| 461 | 461 | 'description' => 'Access the current type schema of this server.', |
| 462 | 462 | 'type' => newNonNull($__Schema), |
| 463 | - 'resolve' => function ($source, $args, $context, ResolveInfo $info): Schema { |
|
| 463 | + 'resolve' => function($source, $args, $context, ResolveInfo $info): Schema { |
|
| 464 | 464 | return $info->getSchema(); |
| 465 | 465 | }, |
| 466 | 466 | ]); |
@@ -468,13 +468,13 @@ discard block |
||
| 468 | 468 | ->addArgument(GraphQL::SCHEMA_INTROSPECTION); |
| 469 | 469 | |
| 470 | 470 | $this->container |
| 471 | - ->share(GraphQL::TYPE_META_FIELD_DEFINITION, function ($__Type) { |
|
| 471 | + ->share(GraphQL::TYPE_META_FIELD_DEFINITION, function($__Type) { |
|
| 472 | 472 | return newField([ |
| 473 | 473 | 'name' => '__type', |
| 474 | 474 | 'description' => 'Request the type information of a single type.', |
| 475 | 475 | 'type' => $__Type, |
| 476 | 476 | 'args' => ['name' => ['type' => newNonNull(stringType())]], |
| 477 | - 'resolve' => function ($source, $args, $context, ResolveInfo $info): ?TypeInterface { |
|
| 477 | + 'resolve' => function($source, $args, $context, ResolveInfo $info): ?TypeInterface { |
|
| 478 | 478 | ['name' => $name] = $args; |
| 479 | 479 | return $info->getSchema()->getType($name); |
| 480 | 480 | }, |
@@ -483,12 +483,12 @@ discard block |
||
| 483 | 483 | ->addArgument(GraphQL::TYPE_INTROSPECTION); |
| 484 | 484 | |
| 485 | 485 | $this->container |
| 486 | - ->share(GraphQL::TYPE_NAME_META_FIELD_DEFINITION, function () { |
|
| 486 | + ->share(GraphQL::TYPE_NAME_META_FIELD_DEFINITION, function() { |
|
| 487 | 487 | return newField([ |
| 488 | 488 | 'name' => '__typename', |
| 489 | 489 | 'description' => 'The name of the current Object type at runtime.', |
| 490 | 490 | 'type' => newNonNull(stringType()), |
| 491 | - 'resolve' => function ($source, $args, $context, ResolveInfo $info): string { |
|
| 491 | + 'resolve' => function($source, $args, $context, ResolveInfo $info): string { |
|
| 492 | 492 | return $info->getParentType()->getName(); |
| 493 | 493 | }, |
| 494 | 494 | ]); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function register() |
| 24 | 24 | { |
| 25 | 25 | $this->container |
| 26 | - ->share(GraphQL::INCLUDE_DIRECTIVE, function () { |
|
| 26 | + ->share(GraphQL::INCLUDE_DIRECTIVE, function() { |
|
| 27 | 27 | return newDirective([ |
| 28 | 28 | 'name' => 'include', |
| 29 | 29 | 'description' => |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | }); |
| 45 | 45 | |
| 46 | 46 | $this->container |
| 47 | - ->share(GraphQL::SKIP_DIRECTIVE, function () { |
|
| 47 | + ->share(GraphQL::SKIP_DIRECTIVE, function() { |
|
| 48 | 48 | return newDirective([ |
| 49 | 49 | 'name' => 'skip', |
| 50 | 50 | 'description' => |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | }); |
| 66 | 66 | |
| 67 | 67 | $this->container |
| 68 | - ->share(GraphQL::DEPRECATED_DIRECTIVE, function () { |
|
| 68 | + ->share(GraphQL::DEPRECATED_DIRECTIVE, function() { |
|
| 69 | 69 | return newDirective([ |
| 70 | 70 | 'name' => 'deprecated', |
| 71 | 71 | 'description' => 'Marks an element of a GraphQL schema as no longer supported.', |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | $promise = new FulfilledPromise([]); |
| 183 | 183 | |
| 184 | - $resolve = function ($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
| 184 | + $resolve = function($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
| 185 | 185 | $fieldPath = $path; |
| 186 | 186 | $fieldPath[] = $fieldName; |
| 187 | 187 | try { |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if ($result instanceof ExtendedPromiseInterface) { |
| 194 | - return $result->then(function ($resolvedResult) use ($fieldName, $results) { |
|
| 194 | + return $result->then(function($resolvedResult) use ($fieldName, $results) { |
|
| 195 | 195 | $results[$fieldName] = $resolvedResult; |
| 196 | 196 | |
| 197 | 197 | return $results; |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | }; |
| 205 | 205 | |
| 206 | 206 | foreach ($fields as $fieldName => $fieldNodes) { |
| 207 | - $promise = $promise->then(function ($resolvedResults) use ( |
|
| 207 | + $promise = $promise->then(function($resolvedResults) use ( |
|
| 208 | 208 | $resolve, |
| 209 | 209 | $fieldName, |
| 210 | 210 | $path, |
@@ -216,9 +216,9 @@ discard block |
||
| 216 | 216 | }); |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $promise->then(function ($resolvedResults) use (&$finalResults) { |
|
| 219 | + $promise->then(function($resolvedResults) use (&$finalResults) { |
|
| 220 | 220 | $finalResults = $resolvedResults ?? []; |
| 221 | - })->otherwise(function (\Throwable $ex) { |
|
| 221 | + })->otherwise(function(\Throwable $ex) { |
|
| 222 | 222 | if (!$ex instanceof ExecutionException) { |
| 223 | 223 | $ex = new ExecutionException($ex->getMessage(), null, null, null, null, null, $ex); |
| 224 | 224 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | ); |
| 300 | 300 | |
| 301 | 301 | if ($completed instanceof ExtendedPromiseInterface) { |
| 302 | - return $completed->then(null, function ($error) use ($fieldNodes, $path) { |
|
| 302 | + return $completed->then(null, function($error) use ($fieldNodes, $path) { |
|
| 303 | 303 | if ($error instanceof \Exception) { |
| 304 | 304 | $this->handleError( |
| 305 | 305 | $this->buildLocatedError($error, $fieldNodes, $path) |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | $keys = \array_keys($finalResults); |
| 398 | 398 | $promise = promiseAll(\array_values($finalResults)); |
| 399 | 399 | |
| 400 | - $promise->then(function ($values) use ($keys, &$finalResults) { |
|
| 400 | + $promise->then(function($values) use ($keys, &$finalResults) { |
|
| 401 | 401 | /** @noinspection ForeachSourceInspection */ |
| 402 | 402 | foreach ($values as $i => $value) { |
| 403 | 403 | $finalResults[$keys[$i]] = $value; |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | &$result |
| 498 | 498 | ) { |
| 499 | 499 | if ($result instanceof ExtendedPromiseInterface) { |
| 500 | - return $result->then(function (&$value) use ($returnType, $fieldNodes, $info, $path) { |
|
| 500 | + return $result->then(function(&$value) use ($returnType, $fieldNodes, $info, $path) { |
|
| 501 | 501 | return $this->completeValue($returnType, $fieldNodes, $info, $path, $value); |
| 502 | 502 | }); |
| 503 | 503 | } |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | if ($runtimeType instanceof ExtendedPromiseInterface) { |
| 588 | - return $runtimeType->then(function ($resolvedRuntimeType) use ( |
|
| 588 | + return $runtimeType->then(function($resolvedRuntimeType) use ( |
|
| 589 | 589 | $returnType, |
| 590 | 590 | $fieldNodes, |
| 591 | 591 | $info, |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | |
| 720 | 720 | if (!empty($promisedIsTypeOfResults)) { |
| 721 | 721 | return promiseAll($promisedIsTypeOfResults) |
| 722 | - ->then(function ($isTypeOfResults) use ($possibleTypes) { |
|
| 722 | + ->then(function($isTypeOfResults) use ($possibleTypes) { |
|
| 723 | 723 | /** @noinspection ForeachSourceInspection */ |
| 724 | 724 | foreach ($isTypeOfResults as $index => $result) { |
| 725 | 725 | if ($result) { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | return $middleware; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - return \array_filter($middleware, function (ResolverMiddlewareInterface $mw) use ($resolverMiddleware) { |
|
| 118 | + return \array_filter($middleware, function(ResolverMiddlewareInterface $mw) use ($resolverMiddleware) { |
|
| 119 | 119 | return \in_array(\get_class($mw), $resolverMiddleware, true); |
| 120 | 120 | }); |
| 121 | 121 | } |
@@ -129,8 +129,8 @@ discard block |
||
| 129 | 129 | { |
| 130 | 130 | return \array_reduce( |
| 131 | 131 | $middleware, |
| 132 | - function (callable $resolveCallback, ResolverMiddlewareInterface $middleware) { |
|
| 133 | - return function ($rootValue, array $arguments, $context = null, ?ResolveInfo $info = null) use ( |
|
| 132 | + function(callable $resolveCallback, ResolverMiddlewareInterface $middleware) { |
|
| 133 | + return function($rootValue, array $arguments, $context = null, ?ResolveInfo $info = null) use ( |
|
| 134 | 134 | $resolveCallback, |
| 135 | 135 | $middleware |
| 136 | 136 | ) { |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function getResolveCallback(): ?callable |
| 32 | 32 | { |
| 33 | - return function ($rootValue, array $arguments, $context = null, ?ResolveInfo $info = null) { |
|
| 33 | + return function($rootValue, array $arguments, $context = null, ?ResolveInfo $info = null) { |
|
| 34 | 34 | return $this->resolve($rootValue, $arguments, $context, $info); |
| 35 | 35 | }; |
| 36 | 36 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | public function getResolveCallback(): ?callable |
| 13 | 13 | { |
| 14 | - return function (string $fieldName) { |
|
| 14 | + return function(string $fieldName) { |
|
| 15 | 15 | return $this->getResolver($fieldName); |
| 16 | 16 | }; |
| 17 | 17 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | public function getTypeResolver(): ?callable |
| 13 | 13 | { |
| 14 | - return function ($rootValue, $context = null, ?ResolveInfo $info = null) { |
|
| 14 | + return function($rootValue, $context = null, ?ResolveInfo $info = null) { |
|
| 15 | 15 | return $this->resolveType($rootValue, $context, $info); |
| 16 | 16 | }; |
| 17 | 17 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function getResolveCallback(): ?callable |
| 45 | 45 | { |
| 46 | - return function (string $fieldName) { |
|
| 46 | + return function(string $fieldName) { |
|
| 47 | 47 | $resolver = $this->getResolver($fieldName); |
| 48 | 48 | |
| 49 | 49 | return $resolver instanceof ResolverInterface |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | protected function enterFragmentDefinition(FragmentDefinitionNode $node): VisitorResult |
| 28 | 28 | { |
| 29 | - $this->validateFragementNode($node, function (FragmentDefinitionNode $node) { |
|
| 29 | + $this->validateFragementNode($node, function(FragmentDefinitionNode $node) { |
|
| 30 | 30 | return fragmentOnNonCompositeMessage((string)$node, (string)$node->getTypeCondition()); |
| 31 | 31 | }); |
| 32 | 32 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | protected function enterInlineFragment(InlineFragmentNode $node): VisitorResult |
| 40 | 40 | { |
| 41 | - $this->validateFragementNode($node, function (InlineFragmentNode $node) { |
|
| 41 | + $this->validateFragementNode($node, function(InlineFragmentNode $node) { |
|
| 42 | 42 | return inlineFragmentOnNonCompositeMessage((string)$node->getTypeCondition()); |
| 43 | 43 | }); |
| 44 | 44 | |