Passed
Pull Request — master (#297)
by Christoffer
02:33
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 (\Throwable $ex) {
221
+        })->otherwise(function(\Throwable $ex) {
222 222
             if (!$ex instanceof ExecutionException) {
223 223
                 $ex = new ExecutionException($ex->getMessage(), null, null, null, null, null, $ex);
224 224
             }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
             );
300 300
 
301 301
             if ($completed instanceof ExtendedPromiseInterface) {
302
-                return $completed->then(null, function ($error) use ($fieldNodes, $path) {
302
+                return $completed->then(null, function($error) use ($fieldNodes, $path) {
303 303
                     if ($error instanceof \Exception) {
304 304
                         $this->handleError(
305 305
                             $this->buildLocatedError($error, $fieldNodes, $path)
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
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;
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
         &$result
498 498
     ) {
499 499
         if ($result instanceof ExtendedPromiseInterface) {
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.