@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function by($subject) |
93 | 93 | { |
94 | - if($subject instanceof Model) { |
|
94 | + if ($subject instanceof Model) { |
|
95 | 95 | $this->keys->append($this->keys->modelName($subject), $subject->{$subject->getKeyName()}); |
96 | 96 | } else if (is_array($subject)) { |
97 | 97 | $this->keys->append(array_keys($subject)[0], Arr::first($subject)); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function recordedIp() |
122 | 122 | { |
123 | - return ! $this->redis->set($this->keys->ip(request()->ip()), true, 'EX', $this->ipSeconds, 'NX'); |
|
123 | + return !$this->redis->set($this->keys->ip(request()->ip()), true, 'EX', $this->ipSeconds, 'NX'); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
@@ -143,8 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | return intval( |
145 | 145 | $this->keys->instanceOfModel ? |
146 | - $this->redis->zscore($this->keys->visits, $this->keys->id) : |
|
147 | - $this->redis->get($this->keys->visitsTotal()) |
|
146 | + $this->redis->zscore($this->keys->visits, $this->keys->id) : $this->redis->get($this->keys->visitsTotal()) |
|
148 | 147 | ); |
149 | 148 | } |
150 | 149 | |
@@ -185,14 +184,14 @@ discard block |
||
185 | 184 | $this->redis->zincrby($this->keys->visits, $inc, $this->keys->id); |
186 | 185 | $this->redis->incrby($this->keys->visitsTotal(), $inc); |
187 | 186 | |
188 | - if(is_array($this->globalIgnore) && sizeof($this->globalIgnore) > 0) { |
|
187 | + if (is_array($this->globalIgnore) && sizeof($this->globalIgnore) > 0) { |
|
189 | 188 | $ignore = array_merge($ignore, $this->globalIgnore); |
190 | 189 | } |
191 | 190 | |
192 | 191 | //NOTE: $$method is parameter also .. ($periods,$country,$refer) |
193 | 192 | foreach (['country', 'refer', 'periods', 'operatingSystem', 'language'] as $method) { |
194 | - if(! in_array($method, $ignore)) { |
|
195 | - $this->{'record'.studly_case($method)}($inc); |
|
193 | + if (!in_array($method, $ignore)) { |
|
194 | + $this->{'record' . studly_case($method)}($inc); |
|
196 | 195 | } |
197 | 196 | } |
198 | 197 | } |