@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | $promise = new FulfilledPromise([]); |
| 172 | 172 | |
| 173 | - $resolve = function ($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
| 173 | + $resolve = function($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
| 174 | 174 | $fieldPath = $path; |
| 175 | 175 | $fieldPath[] = $fieldName; |
| 176 | 176 | try { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | if ($this->isPromise($result)) { |
| 183 | 183 | /** @var ExtendedPromiseInterface $result */ |
| 184 | - return $result->then(function ($resolvedResult) use ($fieldName, $results) { |
|
| 184 | + return $result->then(function($resolvedResult) use ($fieldName, $results) { |
|
| 185 | 185 | $results[$fieldName] = $resolvedResult; |
| 186 | 186 | return $results; |
| 187 | 187 | }); |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | }; |
| 194 | 194 | |
| 195 | 195 | foreach ($fields as $fieldName => $fieldNodes) { |
| 196 | - $promise = $promise->then(function ($resolvedResults) use ( |
|
| 196 | + $promise = $promise->then(function($resolvedResults) use ( |
|
| 197 | 197 | $resolve, |
| 198 | 198 | $fieldName, |
| 199 | 199 | $path, |
@@ -205,9 +205,9 @@ discard block |
||
| 205 | 205 | }); |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - $promise->then(function ($resolvedResults) use (&$finalResults) { |
|
| 208 | + $promise->then(function($resolvedResults) use (&$finalResults) { |
|
| 209 | 209 | $finalResults = $resolvedResults ?? []; |
| 210 | - })->otherwise(function ($ex) { |
|
| 210 | + })->otherwise(function($ex) { |
|
| 211 | 211 | $this->context->addError($ex); |
| 212 | 212 | }); |
| 213 | 213 | |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | if ($this->isPromise($completed)) { |
| 285 | 285 | $context = $this->context; |
| 286 | 286 | /** @var ExtendedPromiseInterface $completed */ |
| 287 | - return $completed->then(null, function ($error) use ($context, $fieldNodes, $path) { |
|
| 287 | + return $completed->then(null, function($error) use ($context, $fieldNodes, $path) { |
|
| 288 | 288 | //@TODO Handle $error better |
| 289 | 289 | if ($error instanceof \Exception) { |
| 290 | 290 | $context->addError($this->buildLocatedError($error, $fieldNodes, $path)); |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | $keys = \array_keys($finalResults); |
| 379 | 379 | $promise = promiseAll(\array_values($finalResults)); |
| 380 | 380 | |
| 381 | - $promise->then(function ($values) use ($keys, &$finalResults) { |
|
| 381 | + $promise->then(function($values) use ($keys, &$finalResults) { |
|
| 382 | 382 | /** @noinspection ForeachSourceInspection */ |
| 383 | 383 | foreach ($values as $i => $value) { |
| 384 | 384 | $finalResults[$keys[$i]] = $value; |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | ) { |
| 477 | 477 | if ($this->isPromise($result)) { |
| 478 | 478 | /** @var ExtendedPromiseInterface $result */ |
| 479 | - return $result->then(function (&$value) use ($returnType, $fieldNodes, $info, $path) { |
|
| 479 | + return $result->then(function(&$value) use ($returnType, $fieldNodes, $info, $path) { |
|
| 480 | 480 | return $this->completeValue($returnType, $fieldNodes, $info, $path, $value); |
| 481 | 481 | }); |
| 482 | 482 | } |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | |
| 565 | 565 | if ($this->isPromise($runtimeType)) { |
| 566 | 566 | /** @var ExtendedPromiseInterface $runtimeType */ |
| 567 | - return $runtimeType->then(function ($resolvedRuntimeType) use ( |
|
| 567 | + return $runtimeType->then(function($resolvedRuntimeType) use ( |
|
| 568 | 568 | $returnType, |
| 569 | 569 | $fieldNodes, |
| 570 | 570 | $info, |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | |
| 693 | 693 | if (!empty($promisedIsTypeOfResults)) { |
| 694 | 694 | return promiseAll($promisedIsTypeOfResults) |
| 695 | - ->then(function ($isTypeOfResults) use ($possibleTypes) { |
|
| 695 | + ->then(function($isTypeOfResults) use ($possibleTypes) { |
|
| 696 | 696 | /** @noinspection ForeachSourceInspection */ |
| 697 | 697 | foreach ($isTypeOfResults as $index => $result) { |
| 698 | 698 | if ($result) { |