Passed
Pull Request — master (#297)
by Christoffer
02:54
created
src/Execution/Executor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
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 {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
             }
194 194
 
195 195
             if ($result instanceof ExtendedPromiseInterface) {
196
-                return $result->then(function ($resolvedResult) use ($fieldName, $results) {
196
+                return $result->then(function($resolvedResult) use ($fieldName, $results) {
197 197
                     $results[$fieldName] = $resolvedResult;
198 198
 
199 199
                     return $results;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         };
207 207
 
208 208
         foreach ($fields as $fieldName => $fieldNodes) {
209
-            $promise = $promise->then(function ($resolvedResults) use (
209
+            $promise = $promise->then(function($resolvedResults) use (
210 210
                 $resolve,
211 211
                 $fieldName,
212 212
                 $path,
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
             });
219 219
         }
220 220
 
221
-        $promise->then(function ($resolvedResults) use (&$finalResults) {
221
+        $promise->then(function($resolvedResults) use (&$finalResults) {
222 222
             $finalResults = $resolvedResults ?? [];
223
-        })->otherwise(function (ExecutionException $ex) {
223
+        })->otherwise(function(ExecutionException $ex) {
224 224
             $this->handleError($ex);
225 225
         });
226 226
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                 $context = $this->context;
301 301
 
302 302
                 /** @var ExtendedPromiseInterface $completed */
303
-                return $completed->then(null, function ($error) use ($context, $fieldNodes, $path) {
303
+                return $completed->then(null, function($error) use ($context, $fieldNodes, $path) {
304 304
                     //@TODO Handle $error better
305 305
                     if ($error instanceof \Exception) {
306 306
                         $context->addError($this->buildLocatedError($error, $fieldNodes, $path));
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             $keys    = \array_keys($finalResults);
397 397
             $promise = promiseAll(\array_values($finalResults));
398 398
 
399
-            $promise->then(function ($values) use ($keys, &$finalResults) {
399
+            $promise->then(function($values) use ($keys, &$finalResults) {
400 400
                 /** @noinspection ForeachSourceInspection */
401 401
                 foreach ($values as $i => $value) {
402 402
                     $finalResults[$keys[$i]] = $value;
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
     ) {
498 498
         if ($result instanceof ExtendedPromiseInterface) {
499 499
             /** @var ExtendedPromiseInterface $result */
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.