Passed
Pull Request — master (#297)
by Christoffer
04:04 queued 01:36
created
src/Execution/Executor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
         $promise = new FulfilledPromise([]);
183 183
 
184
-        $resolve = function ($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) {
184
+        $resolve = function($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) {
185 185
             $fieldPath   = $path;
186 186
             $fieldPath[] = $fieldName;
187 187
             try {
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             }
192 192
 
193 193
             if ($result instanceof ExtendedPromiseInterface) {
194
-                return $result->then(function ($resolvedResult) use ($fieldName, $results) {
194
+                return $result->then(function($resolvedResult) use ($fieldName, $results) {
195 195
                     $results[$fieldName] = $resolvedResult;
196 196
 
197 197
                     return $results;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         };
205 205
 
206 206
         foreach ($fields as $fieldName => $fieldNodes) {
207
-            $promise = $promise->then(function ($resolvedResults) use (
207
+            $promise = $promise->then(function($resolvedResults) use (
208 208
                 $resolve,
209 209
                 $fieldName,
210 210
                 $path,
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
             });
217 217
         }
218 218
 
219
-        $promise->then(function ($resolvedResults) use (&$finalResults) {
219
+        $promise->then(function($resolvedResults) use (&$finalResults) {
220 220
             $finalResults = $resolvedResults ?? [];
221
-        })->otherwise(function (ExecutionException $ex) {
221
+        })->otherwise(function(ExecutionException $ex) {
222 222
             $this->handleError($ex);
223 223
         });
224 224
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             );
297 297
 
298 298
             if ($completed instanceof ExtendedPromiseInterface) {
299
-                return $completed->then(null, function ($error) use ($fieldNodes, $path) {
299
+                return $completed->then(null, function($error) use ($fieldNodes, $path) {
300 300
                     if ($error instanceof \Exception) {
301 301
                         $this->handleError(
302 302
                             $this->buildLocatedError($error, $fieldNodes, $path)
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             $keys    = \array_keys($finalResults);
395 395
             $promise = promiseAll(\array_values($finalResults));
396 396
 
397
-            $promise->then(function ($values) use ($keys, &$finalResults) {
397
+            $promise->then(function($values) use ($keys, &$finalResults) {
398 398
                 /** @noinspection ForeachSourceInspection */
399 399
                 foreach ($values as $i => $value) {
400 400
                     $finalResults[$keys[$i]] = $value;
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
         &$result
495 495
     ) {
496 496
         if ($result instanceof ExtendedPromiseInterface) {
497
-            return $result->then(function (&$value) use ($returnType, $fieldNodes, $info, $path) {
497
+            return $result->then(function(&$value) use ($returnType, $fieldNodes, $info, $path) {
498 498
                 return $this->completeValue($returnType, $fieldNodes, $info, $path, $value);
499 499
             });
500 500
         }
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
         }
583 583
 
584 584
         if ($runtimeType instanceof ExtendedPromiseInterface) {
585
-            return $runtimeType->then(function ($resolvedRuntimeType) use (
585
+            return $runtimeType->then(function($resolvedRuntimeType) use (
586 586
                 $returnType,
587 587
                 $fieldNodes,
588 588
                 $info,
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
 
717 717
         if (!empty($promisedIsTypeOfResults)) {
718 718
             return promiseAll($promisedIsTypeOfResults)
719
-                ->then(function ($isTypeOfResults) use ($possibleTypes) {
719
+                ->then(function($isTypeOfResults) use ($possibleTypes) {
720 720
                     /** @noinspection ForeachSourceInspection */
721 721
                     foreach ($isTypeOfResults as $index => $result) {
722 722
                         if ($result) {
Please login to merge, or discard this patch.