@@ -70,11 +70,11 @@  | 
                                                    ||
| 70 | 70 | */  | 
                                                        
| 71 | 71 | private function validateOptions($maxBatchSize, $shouldBatch, $shouldCache)  | 
                                                        
| 72 | 72 |      { | 
                                                        
| 73 | -        if (! is_bool($shouldBatch)) { | 
                                                        |
| 73 | +        if ( ! is_bool($shouldBatch)) { | 
                                                        |
| 74 | 74 |              throw new \InvalidArgumentException('Expected argument $shouldBatch to be a boolean'); | 
                                                        
| 75 | 75 | }  | 
                                                        
| 76 | 76 | |
| 77 | -        if (! is_bool($shouldCache)) { | 
                                                        |
| 77 | +        if ( ! is_bool($shouldCache)) { | 
                                                        |
| 78 | 78 |              throw new \InvalidArgumentException('Expected argument $shouldCache to be a boolean'); | 
                                                        
| 79 | 79 | }  | 
                                                        
| 80 | 80 | |
@@ -69,7 +69,7 @@ discard block  | 
                                                    ||
| 69 | 69 | }  | 
                                                        
| 70 | 70 | |
| 71 | 71 | $promise = new Promise(  | 
                                                        
| 72 | -            function (callable $resolve, callable $reject) use ($key) { | 
                                                        |
| 72 | +            function(callable $resolve, callable $reject) use ($key) { | 
                                                        |
| 73 | 73 | $this->promiseQueue[] = [  | 
                                                        
| 74 | 74 | 'key' => $key,  | 
                                                        
| 75 | 75 | 'resolve' => $resolve,  | 
                                                        
@@ -96,7 +96,7 @@ discard block  | 
                                                    ||
| 96 | 96 |      { | 
                                                        
| 97 | 97 | return \React\Promise\all(  | 
                                                        
| 98 | 98 | array_map(  | 
                                                        
| 99 | -                function ($key) { | 
                                                        |
| 99 | +                function($key) { | 
                                                        |
| 100 | 100 | return $this->load($key);  | 
                                                        
| 101 | 101 | },  | 
                                                        
| 102 | 102 | $keys  | 
                                                        
@@ -129,7 +129,7 @@ discard block  | 
                                                    ||
| 129 | 129 | */  | 
                                                        
| 130 | 130 | public function prime($key, $value)  | 
                                                        
| 131 | 131 |      { | 
                                                        
| 132 | -        if (! $this->promiseCache->get($key)) { | 
                                                        |
| 132 | +        if ( ! $this->promiseCache->get($key)) { | 
                                                        |
| 133 | 133 | // Cache a rejected promise if the value is an Exception, in order to match  | 
                                                        
| 134 | 134 | // the behavior of load($key).  | 
                                                        
| 135 | 135 | $promise = $value instanceof \Exception ? \React\Promise\reject($value) : \React\Promise\resolve($value);  | 
                                                        
@@ -150,7 +150,7 @@ discard block  | 
                                                    ||
| 150 | 150 |      { | 
                                                        
| 151 | 151 |          if ($this->options->shouldBatch()) { | 
                                                        
| 152 | 152 | $this->eventLoop->nextTick(  | 
                                                        
| 153 | -                function () { | 
                                                        |
| 153 | +                function() { | 
                                                        |
| 154 | 154 | $this->dispatchQueue();  | 
                                                        
| 155 | 155 | }  | 
                                                        
| 156 | 156 | );  | 
                                                        
@@ -193,7 +193,7 @@ discard block  | 
                                                    ||
| 193 | 193 | /** @var Promise $batchPromise */  | 
                                                        
| 194 | 194 | $batchPromise = $batchLoadFunction($keys);  | 
                                                        
| 195 | 195 | |
| 196 | -        if (! $batchPromise || ! is_callable([$batchPromise, 'then'])) { | 
                                                        |
| 196 | +        if ( ! $batchPromise || ! is_callable([$batchPromise, 'then'])) { | 
                                                        |
| 197 | 197 | return $this->handleFailedDispatch($batch, new DataLoaderException(  | 
                                                        
| 198 | 198 | self::class . ' must be constructed with a function which accepts ' .  | 
                                                        
| 199 | 199 | 'an array of keys and returns a Promise which resolves to an array of values ' .  | 
                                                        
@@ -202,11 +202,11 @@ discard block  | 
                                                    ||
| 202 | 202 | }  | 
                                                        
| 203 | 203 | |
| 204 | 204 | $batchPromise->then(  | 
                                                        
| 205 | -            function ($values) use ($batch, $keys) { | 
                                                        |
| 205 | +            function($values) use ($batch, $keys) { | 
                                                        |
| 206 | 206 | $this->validateBatchPromiseOutput($values, $keys);  | 
                                                        
| 207 | 207 | $this->handleSuccessfulDispatch($batch, $values);  | 
                                                        
| 208 | 208 | }  | 
                                                        
| 209 | -        )->then(null, function ($error) use ($batch) { | 
                                                        |
| 209 | +        )->then(null, function($error) use ($batch) { | 
                                                        |
| 210 | 210 | $this->handleFailedDispatch($batch, $error);  | 
                                                        
| 211 | 211 | });  | 
                                                        
| 212 | 212 | }  | 
                                                        
@@ -271,7 +271,7 @@ discard block  | 
                                                    ||
| 271 | 271 | */  | 
                                                        
| 272 | 272 | private function validateBatchPromiseOutput($values, $keys)  | 
                                                        
| 273 | 273 |      { | 
                                                        
| 274 | -        if (! is_array($values)) { | 
                                                        |
| 274 | +        if ( ! is_array($values)) { | 
                                                        |
| 275 | 275 | throw new DataLoaderException(  | 
                                                        
| 276 | 276 | self::class . ' must be constructed with a function which accepts ' .  | 
                                                        
| 277 | 277 | 'an array of keys and returns a Promise which resolves to an array of values ' .  |