@@ -258,13 +258,13 @@ discard block |
||
258 | 258 | { |
259 | 259 | $this->cache->flushCache(); |
260 | 260 | |
261 | - $value = $this->cache->remember('remember_test_key', 60, function () { |
|
261 | + $value = $this->cache->remember('remember_test_key', 60, function() { |
|
262 | 262 | return 'valor_teste'; |
263 | 263 | }); |
264 | 264 | |
265 | 265 | $this->assertEquals('valor_teste', $value); |
266 | 266 | |
267 | - $cachedValue = $this->cache->remember('remember_test_key', 60, function (){ |
|
267 | + $cachedValue = $this->cache->remember('remember_test_key', 60, function() { |
|
268 | 268 | return 'novo_valor'; |
269 | 269 | }); |
270 | 270 | |
@@ -276,12 +276,12 @@ discard block |
||
276 | 276 | { |
277 | 277 | $this->cache->flushCache(); |
278 | 278 | |
279 | - $value = $this->cache->rememberForever('remember_forever_key', function () { |
|
279 | + $value = $this->cache->rememberForever('remember_forever_key', function() { |
|
280 | 280 | return 'valor_eterno'; |
281 | 281 | }); |
282 | 282 | $this->assertEquals('valor_eterno', $value); |
283 | 283 | |
284 | - $cachedValue = $this->cache->rememberForever('remember_forever_key', function () { |
|
284 | + $cachedValue = $this->cache->rememberForever('remember_forever_key', function() { |
|
285 | 285 | return 'novo_valor'; |
286 | 286 | }); |
287 | 287 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param string|int $ttl |
58 | 58 | * @return CacheDataFormatter|mixed |
59 | 59 | */ |
60 | - public function getCache(string $cacheKey, string $namespace = '', string|int $ttl = 3600) |
|
60 | + public function getCache(string $cacheKey, string $namespace = '', string | int $ttl = 3600) |
|
61 | 61 | { |
62 | 62 | $cacheData = $this->cacheStore->getCache($cacheKey, $namespace, $ttl); |
63 | 63 | $this->setMessage($this->cacheStore->getMessage(), $this->cacheStore->isSuccess()); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @param string|int $ttl |
72 | 72 | * @return void |
73 | 73 | */ |
74 | - public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string|int $ttl = 3600) |
|
74 | + public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string | int $ttl = 3600) |
|
75 | 75 | { |
76 | 76 | $this->cacheStore->putCache($cacheKey, $cacheData, $namespace, $ttl); |
77 | 77 | $this->setMessage($this->cacheStore->getMessage(), $this->cacheStore->isSuccess()); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param string $namespace |
118 | 118 | * @return mixed |
119 | 119 | */ |
120 | - public function renewCache(string $cacheKey, string|int $ttl = 3600, string $namespace = '') |
|
120 | + public function renewCache(string $cacheKey, string | int $ttl = 3600, string $namespace = '') |
|
121 | 121 | { |
122 | 122 | $renewedCache = $this->cacheStore->renewCache($cacheKey, $ttl, $namespace); |
123 | 123 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | $cacheData = $this->getCache($cacheKey, $namespace); |
142 | 142 | |
143 | - if(!empty($cacheData) && is_numeric($cacheData)) { |
|
143 | + if (!empty($cacheData) && is_numeric($cacheData)) { |
|
144 | 144 | $this->putCache($cacheKey, (int)($cacheData + $amount), $namespace); |
145 | 145 | $this->setMessage($this->getMessage(), $this->isSuccess()); |
146 | 146 | return true; |
@@ -176,11 +176,11 @@ discard block |
||
176 | 176 | * @param Closure $callback |
177 | 177 | * @return mixed |
178 | 178 | */ |
179 | - public function remember(string $cacheKey, int|string $ttl, Closure $callback) |
|
179 | + public function remember(string $cacheKey, int | string $ttl, Closure $callback) |
|
180 | 180 | { |
181 | 181 | $cachedData = $this->getCache($cacheKey, ttl: $ttl); |
182 | 182 | |
183 | - if(!empty($cachedData)) { |
|
183 | + if (!empty($cachedData)) { |
|
184 | 184 | return $cachedData; |
185 | 185 | } |
186 | 186 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | * @param int|string $ttl |
226 | 226 | * @return bool |
227 | 227 | */ |
228 | - public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600) |
|
228 | + public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600) |
|
229 | 229 | { |
230 | 230 | if (!empty($this->getCache($cacheKey, $namespace))) { |
231 | 231 | return true; |