@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** @var ArgumentNode[] $argumentNodeMap */ |
| 60 | - $argumentNodeMap = keyMap($argumentNodes, function (ArgumentNode $value) { |
|
| 60 | + $argumentNodeMap = keyMap($argumentNodes, function(ArgumentNode $value) { |
|
| 61 | 61 | return $value->getNameValue(); |
| 62 | 62 | }); |
| 63 | 63 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | array $variableValues = [] |
| 141 | 141 | ): ?array { |
| 142 | 142 | $directiveNode = $node->hasDirectives() |
| 143 | - ? find($node->getDirectives(), function (NameAwareInterface $value) use ($directive) { |
|
| 143 | + ? find($node->getDirectives(), function(NameAwareInterface $value) use ($directive) { |
|
| 144 | 144 | return $value->getNameValue() === $directive->getName(); |
| 145 | 145 | }) : null; |
| 146 | 146 | |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | ]); |
| 341 | 341 | } |
| 342 | 342 | return new CoercedValue($parseResult); |
| 343 | - } catch (InvalidTypeException|CoercingException $ex) { |
|
| 343 | + } catch (InvalidTypeException | CoercingException $ex) { |
|
| 344 | 344 | return new CoercedValue(null, [ |
| 345 | 345 | $this->buildCoerceException( |
| 346 | 346 | sprintf('Expected type %s', (string)$type), |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | return new CoercedValue($enumValue); |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | - $suggestions = suggestionList((string)$value, \array_map(function (EnumValue $enumValue) { |
|
| 374 | + $suggestions = suggestionList((string)$value, \array_map(function(EnumValue $enumValue) { |
|
| 375 | 375 | return $enumValue->getName(); |
| 376 | 376 | }, $type->getValues())); |
| 377 | 377 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | return promiseReduce( |
| 25 | 25 | \array_keys($fields), |
| 26 | - function ($results, $fieldName) use ($parentType, $rootValue, $path, $fields) { |
|
| 26 | + function($results, $fieldName) use ($parentType, $rootValue, $path, $fields) { |
|
| 27 | 27 | $fieldNodes = $fields[$fieldName]; |
| 28 | 28 | $fieldPath = $path; |
| 29 | 29 | $fieldPath[] = $fieldName; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | if ($result instanceof PromiseInterface) { |
| 38 | - return $result->then(function ($resolvedResult) use ($fieldName, $results) { |
|
| 38 | + return $result->then(function($resolvedResult) use ($fieldName, $results) { |
|
| 39 | 39 | $results[$fieldName] = $resolvedResult; |
| 40 | 40 | return $results; |
| 41 | 41 | }); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | ); |
| 253 | 253 | |
| 254 | 254 | if ($result instanceof PromiseInterface) { |
| 255 | - return $result->then(null, function ($exception) use ($fieldNode, $info) { |
|
| 255 | + return $result->then(null, function($exception) use ($fieldNode, $info) { |
|
| 256 | 256 | return !$exception instanceof ExecutionException |
| 257 | 257 | ? $this->normalizeException($exception, [$fieldNode], $info->getPath()) |
| 258 | 258 | : $exception; |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | ) { |
| 329 | 329 | try { |
| 330 | 330 | $completed = $result instanceof PromiseInterface |
| 331 | - ? $result->then(function ($resolvedResult) use ($returnType, $fieldNodes, $info, $path) { |
|
| 331 | + ? $result->then(function($resolvedResult) use ($returnType, $fieldNodes, $info, $path) { |
|
| 332 | 332 | return $this->completeValue($returnType, $fieldNodes, $info, $path, $resolvedResult); |
| 333 | 333 | }) |
| 334 | 334 | : $this->completeValue($returnType, $fieldNodes, $info, $path, $result); |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | if ($completed instanceof PromiseInterface) { |
| 337 | 337 | // Note: we don't rely on a `catch` method, but we do expect "thenable" |
| 338 | 338 | // to take a second callback for the error case. |
| 339 | - return $completed->then(null, function ($exception) use ($fieldNodes, $path, $returnType) { |
|
| 339 | + return $completed->then(null, function($exception) use ($fieldNodes, $path, $returnType) { |
|
| 340 | 340 | $this->handleFieldError($exception, $fieldNodes, $path, $returnType); |
| 341 | 341 | }); |
| 342 | 342 | } |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | ); |
| 535 | 535 | |
| 536 | 536 | if ($runtimeType instanceof PromiseInterface) { |
| 537 | - return $runtimeType->then(function ($resolvedRuntimeType) use ( |
|
| 537 | + return $runtimeType->then(function($resolvedRuntimeType) use ( |
|
| 538 | 538 | $returnType, |
| 539 | 539 | $fieldNodes, |
| 540 | 540 | $info, |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | $isTypeOf = $returnType->isTypeOf($result, $this->context->getContextValue(), $info); |
| 589 | 589 | |
| 590 | 590 | if ($isTypeOf instanceof PromiseInterface) { |
| 591 | - return $isTypeOf->then(function ($resolvedIsTypeOf) use ($returnType, $result, $fieldNodes, $path) { |
|
| 591 | + return $isTypeOf->then(function($resolvedIsTypeOf) use ($returnType, $result, $fieldNodes, $path) { |
|
| 592 | 592 | if (true === $resolvedIsTypeOf) { |
| 593 | 593 | return $this->executeSubFields($returnType, $fieldNodes, $path, $result); |
| 594 | 594 | } |
@@ -877,7 +877,7 @@ discard block |
||
| 877 | 877 | } |
| 878 | 878 | |
| 879 | 879 | if (!empty($promises)) { |
| 880 | - return \React\Promise\all($promises)->then(function ($resolvedPromises) use ($possibleTypes) { |
|
| 880 | + return \React\Promise\all($promises)->then(function($resolvedPromises) use ($possibleTypes) { |
|
| 881 | 881 | foreach ($resolvedPromises as $index => $result) { |
| 882 | 882 | if (true === $result) { |
| 883 | 883 | return $possibleTypes[$index]; |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function executeFields(ObjectType $parentType, $rootValue, array $path, array $fields) |
| 23 | 23 | { |
| 24 | - $results = []; |
|
| 24 | + $results = []; |
|
| 25 | 25 | $containsPromise = false; |
| 26 | 26 | |
| 27 | 27 | foreach ($fields as $fieldName => $fieldNodes) { |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | continue; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - $containsPromise = $containsPromise || $result instanceof PromiseInterface; |
|
| 37 | + $containsPromise = $containsPromise || $result instanceof PromiseInterface; |
|
| 38 | 38 | $results[$fieldName] = $result; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if ($data instanceof PromiseInterface) { |
| 62 | - $data->then(function ($resolvedData) use (&$data) { |
|
| 62 | + $data->then(function($resolvedData) use (&$data) { |
|
| 63 | 63 | $data = $resolvedData; |
| 64 | 64 | }); |
| 65 | 65 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | if ($result instanceof PromiseInterface) { |
| 102 | - return $result->then(null, function (ExecutionException $exception) use ($context) { |
|
| 102 | + return $result->then(null, function(ExecutionException $exception) use ($context) { |
|
| 103 | 103 | $context->addError($exception); |
| 104 | 104 | return \React\Promise\resolve(null); |
| 105 | 105 | }); |