Completed
Push — master ( a65a6b...acbbb0 )
by Kamil
05:11 queued 01:54
created
src/Cache/Cache.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         if ($this->paused)
191 191
         {
192 192
             $this->paused = false;
193
-            $this->loopTimer = $this->getLoop()->addPeriodicTimer($this->config['interval'], [ $this, 'handleTick' ]);
193
+            $this->loopTimer = $this->getLoop()->addPeriodicTimer($this->config['interval'], [$this, 'handleTick']);
194 194
         }
195 195
     }
196 196
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         }
282 282
 
283 283
         $timer = round($ttl / $this->config['interval']);
284
-        $this->timers[$key] = [ 'timeout' => $timer, 'ttl' => $ttl ];
284
+        $this->timers[$key] = ['timeout' => $timer, 'ttl' => $ttl];
285 285
         $this->timersCounter++;
286 286
         return Promise::doResolve($ttl);
287 287
     }
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
      */
401 401
     protected function createConfig($config = [])
402 402
     {
403
-        return array_merge([ 'interval' => 1e-1 ], $config);
403
+        return array_merge(['interval' => 1e-1], $config);
404 404
     }
405 405
 
406 406
     /**
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
     protected function handleStart()
410 410
     {
411 411
         $this->resume();
412
-        $this->emit('start', [ $this ]);
412
+        $this->emit('start', [$this]);
413 413
     }
414 414
 
415 415
     /**
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
         }
430 430
         $this->endingPromises = [];
431 431
 
432
-        $this->emit('stop', [ $this ]);
432
+        $this->emit('stop', [$this]);
433 433
     }
434 434
 
435 435
     /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,8 @@
 block discarded – undo
272 272
         {
273 273
             return Promise::doReject(new WriteException('Cache object is not open.'));
274 274
         }
275
-        if ($ttl <= 0) {
275
+        if ($ttl <= 0)
276
+        {
276 277
             return Promise::doReject(new WriteException('TTL needs to be higher than 0.'));
277 278
         }
278 279
         if (!array_key_exists($key, $this->storage))
Please login to merge, or discard this patch.