@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | if ($isContainsPromise) { |
| 252 | 252 | $keys = array_keys($finalResults); |
| 253 | 253 | $promise = \React\Promise\all(array_values($finalResults)); |
| 254 | - $promise->then(function ($values) use ($keys, &$finalResults) { |
|
| 254 | + $promise->then(function($values) use ($keys, &$finalResults) { |
|
| 255 | 255 | foreach ($values as $i => $value) { |
| 256 | 256 | $finalResults[$keys[$i]] = $value; |
| 257 | 257 | } |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | $promise = new \React\Promise\FulfilledPromise([]); |
| 287 | 287 | |
| 288 | - $resolve = function ($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
| 288 | + $resolve = function($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
| 289 | 289 | $fieldPath = $path; |
| 290 | 290 | $fieldPath[] = $fieldName; |
| 291 | 291 | try { |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | |
| 297 | 297 | if ($this->isPromise($result)) { |
| 298 | 298 | /** @var ExtendedPromiseInterface $result */ |
| 299 | - return $result->then(function ($resolvedResult) use ($fieldName, $results) { |
|
| 299 | + return $result->then(function($resolvedResult) use ($fieldName, $results) { |
|
| 300 | 300 | $results[$fieldName] = $resolvedResult; |
| 301 | 301 | return $results; |
| 302 | 302 | }); |
@@ -308,12 +308,12 @@ discard block |
||
| 308 | 308 | }; |
| 309 | 309 | |
| 310 | 310 | foreach ($fields as $fieldName => $fieldNodes) { |
| 311 | - $promise = $promise->then(function ($resolvedResults) use ($resolve, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
| 311 | + $promise = $promise->then(function($resolvedResults) use ($resolve, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
| 312 | 312 | return $resolve($resolvedResults, $fieldName, $path, $objectType, $rootValue, $fieldNodes); |
| 313 | 313 | }); |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | - $promise->then(function ($resolvedResults) use (&$finalResults) { |
|
| 316 | + $promise->then(function($resolvedResults) use (&$finalResults) { |
|
| 317 | 317 | $finalResults = $resolvedResults ?? []; |
| 318 | 318 | }); |
| 319 | 319 | |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | if ($this->isPromise($completed)) { |
| 497 | 497 | $context = $this->context; |
| 498 | 498 | /** @var ExtendedPromiseInterface $completed */ |
| 499 | - return $completed->then(null, function ($error) use ($context) { |
|
| 499 | + return $completed->then(null, function($error) use ($context) { |
|
| 500 | 500 | $context->addError($error); |
| 501 | 501 | return new \React\Promise\FulfilledPromise(null); |
| 502 | 502 | }); |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | ) { |
| 563 | 563 | if ($this->isPromise($result)) { |
| 564 | 564 | /** @var ExtendedPromiseInterface $result */ |
| 565 | - return $result->then(function (&$value) use ($returnType, $fieldNodes, $info, $path) { |
|
| 565 | + return $result->then(function(&$value) use ($returnType, $fieldNodes, $info, $path) { |
|
| 566 | 566 | return $this->completeValue($returnType, $fieldNodes, $info, $path, $value); |
| 567 | 567 | }); |
| 568 | 568 | } |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | |
| 651 | 651 | if ($this->isPromise($runtimeType)) { |
| 652 | 652 | /** @var ExtendedPromiseInterface $runtimeType */ |
| 653 | - return $runtimeType->then(function ($resolvedRuntimeType) use ( |
|
| 653 | + return $runtimeType->then(function($resolvedRuntimeType) use ( |
|
| 654 | 654 | $returnType, |
| 655 | 655 | $fieldNodes, |
| 656 | 656 | $info, |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | |
| 776 | 776 | if (!empty($promisedIsTypeOfResults)) { |
| 777 | 777 | return \React\Promise\all($promisedIsTypeOfResults) |
| 778 | - ->then(function ($isTypeOfResults) use ($possibleTypes) { |
|
| 778 | + ->then(function($isTypeOfResults) use ($possibleTypes) { |
|
| 779 | 779 | foreach ($isTypeOfResults as $index => $result) { |
| 780 | 780 | if ($result) { |
| 781 | 781 | return $possibleTypes[$index]; |