@@ -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 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $operationName, |
73 | 73 | [$this, 'resolveField'], |
74 | 74 | null // validationRules |
75 | - )->then(function ($value) use (&$result) { |
|
75 | + )->then(function($value) use (&$result) { |
|
76 | 76 | $result = $value; |
77 | 77 | }); |
78 | 78 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $field = $field->value; |
193 | 193 | } |
194 | 194 | |
195 | - return call(static function () use ($field, $source, $args, $context, $info) { |
|
195 | + return call(static function() use ($field, $source, $args, $context, $info) { |
|
196 | 196 | return $field instanceof \Closure |
197 | 197 | ? $field($source, $args, $context, $info) |
198 | 198 | : $field; |
@@ -223,14 +223,14 @@ discard block |
||
223 | 223 | { |
224 | 224 | if (is_array($source) || $source instanceof \ArrayAccess) { |
225 | 225 | return collect($this->propertyNames($info)) |
226 | - ->map(function ($propertyName) use ($source) { |
|
226 | + ->map(function($propertyName) use ($source) { |
|
227 | 227 | try { |
228 | 228 | return $source[$propertyName] ?? null; |
229 | 229 | } catch (MissingAttributeException) { |
230 | 230 | return null; |
231 | 231 | } |
232 | 232 | }) |
233 | - ->reject(function ($value) { |
|
233 | + ->reject(function($value) { |
|
234 | 234 | return is_null($value); |
235 | 235 | }) |
236 | 236 | ->first(); |
@@ -241,14 +241,14 @@ discard block |
||
241 | 241 | { |
242 | 242 | if (is_object($source)) { |
243 | 243 | return collect($this->propertyNames($info)) |
244 | - ->map(function ($propertyName) use ($source) { |
|
244 | + ->map(function($propertyName) use ($source) { |
|
245 | 245 | try { |
246 | 246 | return $source->{$propertyName} ?? null; |
247 | 247 | } catch (MissingAttributeException) { |
248 | 248 | return null; |
249 | 249 | } |
250 | 250 | }) |
251 | - ->reject(function ($value) { |
|
251 | + ->reject(function($value) { |
|
252 | 252 | return is_null($value); |
253 | 253 | }) |
254 | 254 | ->first(); |