@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | $promise = new FulfilledPromise([]); |
185 | 185 | |
186 | - $resolve = function ($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
186 | + $resolve = function($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) { |
|
187 | 187 | $fieldPath = $path; |
188 | 188 | $fieldPath[] = $fieldName; |
189 | 189 | try { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | if ($this->isPromise($result)) { |
196 | 196 | /** @var ExtendedPromiseInterface $result */ |
197 | - return $result->then(function ($resolvedResult) use ($fieldName, $results) { |
|
197 | + return $result->then(function($resolvedResult) use ($fieldName, $results) { |
|
198 | 198 | $results[$fieldName] = $resolvedResult; |
199 | 199 | |
200 | 200 | return $results; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | }; |
208 | 208 | |
209 | 209 | foreach ($fields as $fieldName => $fieldNodes) { |
210 | - $promise = $promise->then(function ($resolvedResults) use ( |
|
210 | + $promise = $promise->then(function($resolvedResults) use ( |
|
211 | 211 | $resolve, |
212 | 212 | $fieldName, |
213 | 213 | $path, |
@@ -219,9 +219,9 @@ discard block |
||
219 | 219 | }); |
220 | 220 | } |
221 | 221 | |
222 | - $promise->then(function ($resolvedResults) use (&$finalResults) { |
|
222 | + $promise->then(function($resolvedResults) use (&$finalResults) { |
|
223 | 223 | $finalResults = $resolvedResults ?? []; |
224 | - })->otherwise(function (ExecutionException $ex) { |
|
224 | + })->otherwise(function(ExecutionException $ex) { |
|
225 | 225 | $this->handleError($ex); |
226 | 226 | }); |
227 | 227 | |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $context = $this->context; |
302 | 302 | |
303 | 303 | /** @var ExtendedPromiseInterface $completed */ |
304 | - return $completed->then(null, function ($error) use ($context, $fieldNodes, $path) { |
|
304 | + return $completed->then(null, function($error) use ($context, $fieldNodes, $path) { |
|
305 | 305 | //@TODO Handle $error better |
306 | 306 | if ($error instanceof \Exception) { |
307 | 307 | $context->addError($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; |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | ) { |
499 | 499 | if ($this->isPromise($result)) { |
500 | 500 | /** @var ExtendedPromiseInterface $result */ |
501 | - return $result->then(function (&$value) use ($returnType, $fieldNodes, $info, $path) { |
|
501 | + return $result->then(function(&$value) use ($returnType, $fieldNodes, $info, $path) { |
|
502 | 502 | return $this->completeValue($returnType, $fieldNodes, $info, $path, $value); |
503 | 503 | }); |
504 | 504 | } |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | |
588 | 588 | if ($this->isPromise($runtimeType)) { |
589 | 589 | /** @var ExtendedPromiseInterface $runtimeType */ |
590 | - return $runtimeType->then(function ($resolvedRuntimeType) use ( |
|
590 | + return $runtimeType->then(function($resolvedRuntimeType) use ( |
|
591 | 591 | $returnType, |
592 | 592 | $fieldNodes, |
593 | 593 | $info, |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | |
722 | 722 | if (!empty($promisedIsTypeOfResults)) { |
723 | 723 | return promiseAll($promisedIsTypeOfResults) |
724 | - ->then(function ($isTypeOfResults) use ($possibleTypes) { |
|
724 | + ->then(function($isTypeOfResults) use ($possibleTypes) { |
|
725 | 725 | /** @noinspection ForeachSourceInspection */ |
726 | 726 | foreach ($isTypeOfResults as $index => $result) { |
727 | 727 | if ($result) { |