Test Failed
Push — master ( 566e99...add919 )
by Juuso
03:24
created
src/DataLoaderOptions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/DataLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             );
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         /** @var Promise $batchPromise */
193 193
         $batchPromise = ($this->batchLoadFunction)($keys);
194 194
 
195
-        if (! $batchPromise || ! is_callable([$batchPromise, 'then'])) {
195
+        if ( ! $batchPromise || ! is_callable([$batchPromise, 'then'])) {
196 196
             return $this->handleFailedDispatch($batch, new DataLoaderException(
197 197
                 self::class . ' must be constructed with a function which accepts ' .
198 198
                 'an array of keys and returns a Promise which resolves to an array of values ' .
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
         }
202 202
 
203 203
         $batchPromise->then(
204
-            function ($values) use ($batch, $keys) {
204
+            function($values) use ($batch, $keys) {
205 205
                 $this->validateBatchPromiseOutput($values, $keys);
206 206
                 $this->handleSuccessfulDispatch($batch, $values);
207 207
             }
208
-        )->then(null, function ($error) use ($batch) {
208
+        )->then(null, function($error) use ($batch) {
209 209
             $this->handleFailedDispatch($batch, $error);
210 210
         });
211 211
     }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      */
271 271
     private function validateBatchPromiseOutput($values, $keys)
272 272
     {
273
-        if (! is_array($values)) {
273
+        if ( ! is_array($values)) {
274 274
             throw new DataLoaderException(
275 275
                 self::class . ' must be constructed with a function which accepts ' .
276 276
                 'an array of keys and returns a Promise which resolves to an array of values ' .
Please login to merge, or discard this patch.