@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | return; |
104 | 104 | } |
105 | 105 | |
106 | - $cache = is_array($cache) ? (object) $cache : $cache; |
|
106 | + $cache = is_array($cache) ? (object)$cache : $cache; |
|
107 | 107 | |
108 | 108 | // If this cache expiration date is past the current time, we will remove this |
109 | 109 | // item from the cache. Then we will return a null value since the cache is |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | return; |
163 | 163 | } |
164 | 164 | |
165 | - $cache = is_array($cache) ? (object) $cache : $cache; |
|
165 | + $cache = is_array($cache) ? (object)$cache : $cache; |
|
166 | 166 | // If this cache expiration date is past the current time, we will remove this |
167 | 167 | // item from the cache. Then we will return a null value since the cache is |
168 | 168 | // expired. We will use "Carbon" to make this comparison with the column. |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | public function increment($key, $value = 1) |
191 | 191 | { |
192 | - return $this->incrementOrDecrement($key, $value, function ($current, $value) { |
|
192 | + return $this->incrementOrDecrement($key, $value, function($current, $value) { |
|
193 | 193 | return $current + $value; |
194 | 194 | }); |
195 | 195 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | protected function incrementOrDecrement($key, $value, Closure $callback) |
207 | 207 | { |
208 | - return $this->connection->transaction(function () use ($key, $value, $callback) { |
|
208 | + return $this->connection->transaction(function() use ($key, $value, $callback) { |
|
209 | 209 | |
210 | 210 | |
211 | 211 | $cache = $this->table()->where('key', $key) |
@@ -218,14 +218,14 @@ discard block |
||
218 | 218 | return false; |
219 | 219 | } |
220 | 220 | |
221 | - $cache = is_array($cache) ? (object) $cache : $cache; |
|
221 | + $cache = is_array($cache) ? (object)$cache : $cache; |
|
222 | 222 | |
223 | 223 | $current = $this->unserialize($cache->value); |
224 | 224 | |
225 | 225 | // Here we'll call this callback function that was given to the function which |
226 | 226 | // is used to either increment or decrement the function. We use a callback |
227 | 227 | // so we do not have to recreate all this logic in each of the functions. |
228 | - $new = $callback((int) $current, $value); |
|
228 | + $new = $callback((int)$current, $value); |
|
229 | 229 | |
230 | 230 | if (!is_numeric($current)) { |
231 | 231 | return false; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | */ |
253 | 253 | public function decrement($key, $value = 1) |
254 | 254 | { |
255 | - return $this->incrementOrDecrement($key, $value, function ($current, $value) { |
|
255 | + return $this->incrementOrDecrement($key, $value, function($current, $value) { |
|
256 | 256 | return $current - $value; |
257 | 257 | }); |
258 | 258 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | |
19 | 19 | public function __toString() |
20 | 20 | { |
21 | - return __CLASS__.":[{$this->code}]:{$this->message}\n"; |
|
21 | + return __CLASS__ . ":[{$this->code}]:{$this->message}\n"; |
|
22 | 22 | } |
23 | 23 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | |
19 | 19 | public function __toString() |
20 | 20 | { |
21 | - return __CLASS__.":[{$this->code}]:{$this->message}\n"; |
|
21 | + return __CLASS__ . ":[{$this->code}]:{$this->message}\n"; |
|
22 | 22 | } |
23 | 23 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | |
19 | 19 | public function __toString() |
20 | 20 | { |
21 | - return __CLASS__.":[{$this->code}]:{$this->message}\n"; |
|
21 | + return __CLASS__ . ":[{$this->code}]:{$this->message}\n"; |
|
22 | 22 | } |
23 | 23 | } |
@@ -19,6 +19,6 @@ |
||
19 | 19 | |
20 | 20 | public function __toString() |
21 | 21 | { |
22 | - return __CLASS__.":[{$this->code}]:{$this->message}\n"; |
|
22 | + return __CLASS__ . ":[{$this->code}]:{$this->message}\n"; |
|
23 | 23 | } |
24 | 24 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | |
19 | 19 | public function __toString() |
20 | 20 | { |
21 | - return __CLASS__.":[{$this->code}]:{$this->message}\n"; |
|
21 | + return __CLASS__ . ":[{$this->code}]:{$this->message}\n"; |
|
22 | 22 | } |
23 | 23 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | |
19 | 19 | public function __toString() |
20 | 20 | { |
21 | - return __CLASS__.":[{$this->code}]:{$this->message}\n"; |
|
21 | + return __CLASS__ . ":[{$this->code}]:{$this->message}\n"; |
|
22 | 22 | } |
23 | 23 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | |
19 | 19 | public function __toString() |
20 | 20 | { |
21 | - return __CLASS__.":[{$this->code}]:{$this->message}\n"; |
|
21 | + return __CLASS__ . ":[{$this->code}]:{$this->message}\n"; |
|
22 | 22 | } |
23 | 23 | } |
@@ -19,6 +19,6 @@ |
||
19 | 19 | |
20 | 20 | public function __toString() |
21 | 21 | { |
22 | - return __CLASS__.":[{$this->code}]:{$this->message}\n"; |
|
22 | + return __CLASS__ . ":[{$this->code}]:{$this->message}\n"; |
|
23 | 23 | } |
24 | 24 | } |