Passed
Pull Request — master (#217)
by Christoffer
02:32
created
src/Execution/ExecutionResult.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $array = ['data' => $this->data];
67 67
 
68 68
         if (!empty($this->errors)) {
69
-            $array['errors'] = \array_map(function (GraphQLException $error) {
69
+            $array['errors'] = \array_map(function(GraphQLException $error) {
70 70
                 return $error->toArray();
71 71
             }, $this->errors);
72 72
         }
Please login to merge, or discard this patch.
src/Execution/Executor.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,7 +205,7 @@  discard block
 block discarded – undo
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 210
         });
211 211
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             if ($this->isPromise($completed)) {
283 283
                 $context = $this->context;
284 284
                 /** @var ExtendedPromiseInterface $completed */
285
-                return $completed->then(null, function ($error) use ($context, $fieldNodes, $path) {
285
+                return $completed->then(null, function($error) use ($context, $fieldNodes, $path) {
286 286
                     //@TODO Handle $error better
287 287
                     if ($error instanceof \Exception) {
288 288
                         $context->addError($this->buildLocatedError($error, $fieldNodes, $path));
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
         if ($doesContainPromise) {
376 376
             $keys    = \array_keys($finalResults);
377 377
             $promise = promiseAll(\array_values($finalResults));
378
-            $promise->then(function ($values) use ($keys, &$finalResults) {
378
+            $promise->then(function($values) use ($keys, &$finalResults) {
379 379
                 /** @noinspection ForeachSourceInspection */
380 380
                 foreach ($values as $i => $value) {
381 381
                     $finalResults[$keys[$i]] = $value;
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
     ) {
474 474
         if ($this->isPromise($result)) {
475 475
             /** @var ExtendedPromiseInterface $result */
476
-            return $result->then(function (&$value) use ($returnType, $fieldNodes, $info, $path) {
476
+            return $result->then(function(&$value) use ($returnType, $fieldNodes, $info, $path) {
477 477
                 return $this->completeValue($returnType, $fieldNodes, $info, $path, $value);
478 478
             });
479 479
         }
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 
562 562
         if ($this->isPromise($runtimeType)) {
563 563
             /** @var ExtendedPromiseInterface $runtimeType */
564
-            return $runtimeType->then(function ($resolvedRuntimeType) use (
564
+            return $runtimeType->then(function($resolvedRuntimeType) use (
565 565
                 $returnType,
566 566
                 $fieldNodes,
567 567
                 $info,
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 
691 691
         if (!empty($promisedIsTypeOfResults)) {
692 692
             return promiseAll($promisedIsTypeOfResults)
693
-                ->then(function ($isTypeOfResults) use ($possibleTypes) {
693
+                ->then(function($isTypeOfResults) use ($possibleTypes) {
694 694
                     /** @noinspection ForeachSourceInspection */
695 695
                     foreach ($isTypeOfResults as $index => $result) {
696 696
                         if ($result) {
Please login to merge, or discard this patch.