@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $request->input('operationName'), |
46 | 46 | [$this, 'resolveField'], |
47 | 47 | null // validationRules |
48 | - )->then(function ($value) use (&$result) { |
|
48 | + )->then(function($value) use (&$result) { |
|
49 | 49 | $result = $value; |
50 | 50 | }); |
51 | 51 | |
@@ -155,10 +155,10 @@ discard block |
||
155 | 155 | { |
156 | 156 | if (is_array($source) || $source instanceof \ArrayAccess) { |
157 | 157 | return collect($this->propertyNames($info)) |
158 | - ->map(function ($propertyName) use ($source) { |
|
158 | + ->map(function($propertyName) use ($source) { |
|
159 | 159 | return $source[$propertyName] ?? null; |
160 | 160 | }) |
161 | - ->reject(function ($value) { |
|
161 | + ->reject(function($value) { |
|
162 | 162 | return is_null($value); |
163 | 163 | }) |
164 | 164 | ->first(); |
@@ -169,10 +169,10 @@ discard block |
||
169 | 169 | { |
170 | 170 | if (is_object($source)) { |
171 | 171 | return collect($this->propertyNames($info)) |
172 | - ->map(function ($propertyName) use ($source) { |
|
172 | + ->map(function($propertyName) use ($source) { |
|
173 | 173 | return $source->{$propertyName} ?? null; |
174 | 174 | }) |
175 | - ->reject(function ($value) { |
|
175 | + ->reject(function($value) { |
|
176 | 176 | return is_null($value); |
177 | 177 | }) |
178 | 178 | ->first(); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | \GraphQL\Executor\Promise\Adapter\ReactPromiseAdapter::class |
22 | 22 | ); |
23 | 23 | |
24 | - $this->app->bind(\React\EventLoop\LoopInterface::class, function () { |
|
24 | + $this->app->bind(\React\EventLoop\LoopInterface::class, function() { |
|
25 | 25 | return ReactEventLoopFactory::create(); |
26 | 26 | }); |
27 | 27 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function __invoke($batchLoadFunction) |
27 | 27 | { |
28 | - if (! $batchLoadFunction instanceof Closure) { |
|
28 | + if (!$batchLoadFunction instanceof Closure) { |
|
29 | 29 | $batchLoadFunction = Closure::fromCallable($batchLoadFunction); |
30 | 30 | } |
31 | 31 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | private function makeLoader(Closure $batchLoadFunction) |
47 | 47 | { |
48 | 48 | return new LeinonenDataLoader( |
49 | - function (...$arguments) use ($batchLoadFunction) { |
|
49 | + function(...$arguments) use ($batchLoadFunction) { |
|
50 | 50 | $result = $batchLoadFunction(...$arguments); |
51 | 51 | if ($result instanceof Collection) { |
52 | 52 | $result = $result->all(); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | $this->addToAssertionCount(1); |
24 | 24 | |
25 | - if (! $promise instanceof PromiseInterface) { |
|
25 | + if (!$promise instanceof PromiseInterface) { |
|
26 | 26 | $promise = all($promise); |
27 | 27 | } |
28 | 28 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |
40 | - if (! is_null($expectedValue)) { |
|
40 | + if (!is_null($expectedValue)) { |
|
41 | 41 | $this->assertEquals( |
42 | 42 | $expectedValue, |
43 | 43 | $result, |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | protected function getLoop(): LoopInterface |
51 | 51 | { |
52 | - if (! $this->loop) { |
|
52 | + if (!$this->loop) { |
|
53 | 53 | $this->loop = LoopFactory::create(); |
54 | 54 | } |
55 | 55 | |
@@ -64,12 +64,12 @@ discard block |
||
64 | 64 | $rejected = false; |
65 | 65 | |
66 | 66 | $promise->then( |
67 | - function ($c) use (&$resolved, &$wait) { |
|
67 | + function($c) use (&$resolved, &$wait) { |
|
68 | 68 | $resolved = $c; |
69 | 69 | $wait = false; |
70 | 70 | $this->getLoop()->stop(); |
71 | 71 | }, |
72 | - function ($error) use (&$exception, &$rejected, &$wait) { |
|
72 | + function($error) use (&$exception, &$rejected, &$wait) { |
|
73 | 73 | $exception = $error; |
74 | 74 | $rejected = true; |
75 | 75 | $wait = false; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | if ($rejected) { |
89 | - if (! $exception instanceof Exception) { |
|
89 | + if (!$exception instanceof Exception) { |
|
90 | 90 | $type = is_object($exception) ? get_class($exception) : gettype($exception); |
91 | 91 | $exception = new \UnexpectedValueException( |
92 | 92 | 'Promise rejected with unexpected value of type ' . $type, |