@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function __invoke($batchLoadFunction, $defaultResolveValue = null) |
18 | 18 | { |
19 | - if (! $batchLoadFunction instanceof Closure) { |
|
19 | + if (!$batchLoadFunction instanceof Closure) { |
|
20 | 20 | $batchLoadFunction = Closure::fromCallable($batchLoadFunction); |
21 | 21 | } |
22 | 22 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | private function scheduleResolveIfNeeded() |
61 | 61 | { |
62 | - if (! $this->needsResolving) { |
|
62 | + if (!$this->needsResolving) { |
|
63 | 63 | Loop::defer(Closure::fromCallable([$this, 'resolve'])); |
64 | 64 | $this->needsResolving = true; |
65 | 65 | } |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | |
26 | 26 | try { |
27 | 27 | $result = null; |
28 | - Loop::run(function () use (&$result, $promise) { |
|
29 | - $result = yield call(function () use ($promise) { |
|
28 | + Loop::run(function() use (&$result, $promise) { |
|
29 | + $result = yield call(function() use ($promise) { |
|
30 | 30 | return $promise; |
31 | 31 | }); |
32 | 32 | }); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | return; |
40 | 40 | } |
41 | 41 | |
42 | - if (! is_null($expectedValue)) { |
|
42 | + if (!is_null($expectedValue)) { |
|
43 | 43 | $this->assertSame( |
44 | 44 | $expectedValue, |
45 | 45 | $result, |
@@ -346,11 +346,11 @@ |
||
346 | 346 | |
347 | 347 | public function returnTypeIsLeaf(ResolveInfo $info): bool |
348 | 348 | { |
349 | - $returnType = $info->returnType instanceof WrappingType |
|
349 | + $returnType = $info->returnType instanceof WrappingType |
|
350 | 350 | ? $info->returnType->getWrappedType(true) |
351 | 351 | : $info->returnType; |
352 | 352 | |
353 | - return $returnType instanceof LeafType; |
|
353 | + return $returnType instanceof LeafType; |
|
354 | 354 | } |
355 | 355 | |
356 | 356 | public function decorateResponse(array $data): array |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $operationName, |
72 | 72 | [$this, 'resolveField'], |
73 | 73 | null // validationRules |
74 | - )->then(function ($value) use (&$result) { |
|
74 | + )->then(function($value) use (&$result) { |
|
75 | 75 | $result = $value; |
76 | 76 | }); |
77 | 77 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | $field = $field->value; |
192 | 192 | } |
193 | 193 | |
194 | - return call(static function () use ($field, $source, $args, $context, $info) { |
|
194 | + return call(static function() use ($field, $source, $args, $context, $info) { |
|
195 | 195 | return $field instanceof \Closure |
196 | 196 | ? $field($source, $args, $context, $info) |
197 | 197 | : $field; |
@@ -222,10 +222,10 @@ discard block |
||
222 | 222 | { |
223 | 223 | if (is_array($source) || $source instanceof \ArrayAccess) { |
224 | 224 | return collect($this->propertyNames($info)) |
225 | - ->map(function ($propertyName) use ($source) { |
|
225 | + ->map(function($propertyName) use ($source) { |
|
226 | 226 | return $source[$propertyName] ?? null; |
227 | 227 | }) |
228 | - ->reject(function ($value) { |
|
228 | + ->reject(function($value) { |
|
229 | 229 | return is_null($value); |
230 | 230 | }) |
231 | 231 | ->first(); |
@@ -236,10 +236,10 @@ discard block |
||
236 | 236 | { |
237 | 237 | if (is_object($source)) { |
238 | 238 | return collect($this->propertyNames($info)) |
239 | - ->map(function ($propertyName) use ($source) { |
|
239 | + ->map(function($propertyName) use ($source) { |
|
240 | 240 | return $source->{$propertyName} ?? null; |
241 | 241 | }) |
242 | - ->reject(function ($value) { |
|
242 | + ->reject(function($value) { |
|
243 | 243 | return is_null($value); |
244 | 244 | }) |
245 | 245 | ->first(); |