Completed
Push — master ( f8882e...156190 )
by bader
03:45
created
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('visits'))
3
+if (!function_exists('visits'))
4 4
 {
5 5
     function visits($subject, $tag = 'visits')
6 6
     {
Please login to merge, or discard this patch.
src/Visits.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -276,8 +276,7 @@  discard block
 block discarded – undo
276 276
 
277 277
         return intval(
278 278
             (!$this->keys->instanceOfModel) ?
279
-                $this->redis->get($this->keys->visits . '_total') :
280
-                $this->redis->zscore($this->keys->visits, $this->keys->id)
279
+                $this->redis->get($this->keys->visits . '_total') : $this->redis->zscore($this->keys->visits, $this->keys->id)
281 280
         );
282 281
     }
283 282
 
@@ -388,10 +387,10 @@  discard block
 block discarded – undo
388 387
 
389 388
             return ($this->subject)::whereIn($this->keys->primary, $visitsIds)
390 389
                 ->get()
391
-                ->sortBy(function ($subject) use ($visitsIds) {
390
+                ->sortBy(function($subject) use ($visitsIds) {
392 391
                     return array_search($subject->{$this->keys->primary}, $visitsIds);
393 392
                 })
394
-                ->each(function ($subject) use ($cacheKey) {
393
+                ->each(function($subject) use ($cacheKey) {
395 394
                     $this->redis->rpush($cacheKey, serialize($subject));
396 395
                 });
397 396
         }
Please login to merge, or discard this patch.
src/VisitsServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function register()
27 27
     {
28 28
         $this->mergeConfigFrom(
29
-            __DIR__.'/config/visits.php', 'visits'
29
+            __DIR__ . '/config/visits.php', 'visits'
30 30
         );
31 31
     }
32 32
 }
Please login to merge, or discard this patch.