@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | $promise = new Promise( |
64 | - function (callable $resolve, callable $reject) use ($key) { |
|
64 | + function(callable $resolve, callable $reject) use ($key) { |
|
65 | 65 | $this->promiseQueue[] = [ |
66 | 66 | 'key' => $key, |
67 | 67 | 'resolve' => $resolve, |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public function prime($key, $value): void |
117 | 117 | { |
118 | - if (! $this->promiseCache->get($key)) { |
|
118 | + if ( ! $this->promiseCache->get($key)) { |
|
119 | 119 | // Cache a rejected promise if the value is an Exception, in order to match |
120 | 120 | // the behavior of load($key). |
121 | 121 | $promise = $value instanceof \Exception ? reject($value) : resolve($value); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | $batchPromise |
186 | 186 | ->then( |
187 | - function ($values) use ($batch, $keys) { |
|
187 | + function($values) use ($batch, $keys) { |
|
188 | 188 | $this->validateBatchPromiseOutput($values, $keys); |
189 | 189 | $this->handleSuccessfulDispatch($batch, $values); |
190 | 190 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | */ |
253 | 253 | private function validateBatchPromiseOutput($values, $keys): void |
254 | 254 | { |
255 | - if (! \is_array($values)) { |
|
255 | + if ( ! \is_array($values)) { |
|
256 | 256 | throw new DataLoaderException( |
257 | 257 | self::class . ' must be constructed with a function which accepts ' . |
258 | 258 | 'an array of keys and returns a Promise which resolves to an array of values ' . |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | */ |
280 | 280 | private function validateBatchPromise($batchPromise): void |
281 | 281 | { |
282 | - if (! $batchPromise || ! \is_callable([$batchPromise, 'then'])) { |
|
282 | + if ( ! $batchPromise || ! \is_callable([$batchPromise, 'then'])) { |
|
283 | 283 | throw new DataLoaderException( |
284 | 284 | self::class . ' must be constructed with a function which accepts ' . |
285 | 285 | 'an array of keys and returns a Promise which resolves to an array of values ' . |