Passed
Pull Request — master (#217)
by Christoffer
02:47
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
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
         $promise = new FulfilledPromise([]);
173 173
 
174
-        $resolve = function ($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) {
174
+        $resolve = function($results, $fieldName, $path, $objectType, $rootValue, $fieldNodes) {
175 175
             $fieldPath   = $path;
176 176
             $fieldPath[] = $fieldName;
177 177
             try {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
             if ($this->isPromise($result)) {
184 184
                 /** @var ExtendedPromiseInterface $result */
185
-                return $result->then(function ($resolvedResult) use ($fieldName, $results) {
185
+                return $result->then(function($resolvedResult) use ($fieldName, $results) {
186 186
                     $results[$fieldName] = $resolvedResult;
187 187
                     return $results;
188 188
                 });
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         };
195 195
 
196 196
         foreach ($fields as $fieldName => $fieldNodes) {
197
-            $promise = $promise->then(function ($resolvedResults) use (
197
+            $promise = $promise->then(function($resolvedResults) use (
198 198
                 $resolve,
199 199
                 $fieldName,
200 200
                 $path,
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             });
207 207
         }
208 208
 
209
-        $promise->then(function ($resolvedResults) use (&$finalResults) {
209
+        $promise->then(function($resolvedResults) use (&$finalResults) {
210 210
             $finalResults = $resolvedResults ?? [];
211 211
         });
212 212
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
             if ($this->isPromise($completed)) {
284 284
                 $context = $this->context;
285 285
                 /** @var ExtendedPromiseInterface $completed */
286
-                return $completed->then(null, function ($error) use ($context, $fieldNodes, $path) {
286
+                return $completed->then(null, function($error) use ($context, $fieldNodes, $path) {
287 287
                     //@TODO Handle $error better
288 288
                     if ($error instanceof \Exception) {
289 289
                         $context->addError($this->buildLocatedError($error, $fieldNodes, $path));
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         if ($doesContainPromise) {
377 377
             $keys    = array_keys($finalResults);
378 378
             $promise = \React\Promise\all(array_values($finalResults));
379
-            $promise->then(function ($values) use ($keys, &$finalResults) {
379
+            $promise->then(function($values) use ($keys, &$finalResults) {
380 380
                 /** @noinspection ForeachSourceInspection */
381 381
                 foreach ($values as $i => $value) {
382 382
                     $finalResults[$keys[$i]] = $value;
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
     ) {
475 475
         if ($this->isPromise($result)) {
476 476
             /** @var ExtendedPromiseInterface $result */
477
-            return $result->then(function (&$value) use ($returnType, $fieldNodes, $info, $path) {
477
+            return $result->then(function(&$value) use ($returnType, $fieldNodes, $info, $path) {
478 478
                 return $this->completeValue($returnType, $fieldNodes, $info, $path, $value);
479 479
             });
480 480
         }
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 
563 563
         if ($this->isPromise($runtimeType)) {
564 564
             /** @var ExtendedPromiseInterface $runtimeType */
565
-            return $runtimeType->then(function ($resolvedRuntimeType) use (
565
+            return $runtimeType->then(function($resolvedRuntimeType) use (
566 566
                 $returnType,
567 567
                 $fieldNodes,
568 568
                 $info,
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 
696 696
         if (!empty($promisedIsTypeOfResults)) {
697 697
             return \React\Promise\all($promisedIsTypeOfResults)
698
-                ->then(function ($isTypeOfResults) use ($possibleTypes) {
698
+                ->then(function($isTypeOfResults) use ($possibleTypes) {
699 699
                     /** @noinspection ForeachSourceInspection */
700 700
                     foreach ($isTypeOfResults as $index => $result) {
701 701
                         if ($result) {
Please login to merge, or discard this patch.