Passed
Push — master ( 8994c2...30162a )
by bader
03:20
created
src/Visits.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function by($subject)
79 79
     {
80
-        if($subject instanceof Model) {
80
+        if ($subject instanceof Model) {
81 81
             $this->keys->append($this->keys->modelName($subject), $subject->{$subject->getKeyName()});
82 82
         } else if (is_array($subject)) {
83 83
             $this->keys->append(array_keys($subject)[0], array_first($subject));
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function recordedIp()
108 108
     {
109
-        return ! $this->redis->set($this->keys->ip(request()->ip()), true, 'EX', $this->ipSeconds, 'NX');
109
+        return !$this->redis->set($this->keys->ip(request()->ip()), true, 'EX', $this->ipSeconds, 'NX');
110 110
     }
111 111
 
112 112
     /**
@@ -125,8 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
         return intval(
127 127
             $this->keys->instanceOfModel ?
128
-                $this->redis->zscore($this->keys->visits, $this->keys->id) :
129
-                $this->redis->get($this->keys->visitsTotal())
128
+                $this->redis->zscore($this->keys->visits, $this->keys->id) : $this->redis->get($this->keys->visitsTotal())
130 129
         );
131 130
     }
132 131
 
Please login to merge, or discard this patch.
src/VisitsServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,20 +18,20 @@  discard block
 block discarded – undo
18 18
             __DIR__ . '/config/visits.php' => config_path('visits.php'),
19 19
         ], 'config');
20 20
 
21
-        Carbon::macro('endOfxHours', function ($xhours) {
21
+        Carbon::macro('endOfxHours', function($xhours) {
22 22
 
23
-            if($xhours > 12) {
23
+            if ($xhours > 12) {
24 24
                 throw new \Exception('12 is the maximum period in xHours feature');
25 25
             }
26 26
 
27 27
             $hour = collect(range(1, 23 / $xhours))
28
-                ->map(function ($hour) use ($xhours) {
28
+                ->map(function($hour) use ($xhours) {
29 29
                     return $hour * $xhours;
30
-                })->first(function ($hour) {
30
+                })->first(function($hour) {
31 31
                     return $hour >= $this->hour;
32 32
                 });
33 33
 
34
-            return $this->setTime($hour , 59, 59);
34
+            return $this->setTime($hour, 59, 59);
35 35
         });
36 36
     }
37 37
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function register()
44 44
     {
45 45
         $this->mergeConfigFrom(
46
-            __DIR__.'/config/visits.php', 'visits'
46
+            __DIR__ . '/config/visits.php', 'visits'
47 47
         );
48 48
     }
49 49
 }
Please login to merge, or discard this patch.