@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @param int|string $ttl |
59 | 59 | * @return bool |
60 | 60 | */ |
61 | - public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600) |
|
61 | + public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600) |
|
62 | 62 | { |
63 | 63 | if (!empty($this->getCache($cacheKey, $namespace))) { |
64 | 64 | return true; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | * @param string|int $ttl |
149 | 149 | * @return CacheDataFormatter|mixed |
150 | 150 | */ |
151 | - public function getCache(string $cacheKey, string $namespace = '', string|int $ttl = 3600) |
|
151 | + public function getCache(string $cacheKey, string $namespace = '', string | int $ttl = 3600) |
|
152 | 152 | { |
153 | 153 | $cacheData = $this->cacheStore->getCache($cacheKey, $namespace, $ttl); |
154 | 154 | $this->setMessage($this->cacheStore->getMessage(), $this->cacheStore->isSuccess()); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | { |
177 | 177 | $cacheData = $this->getCache($cacheKey, $namespace); |
178 | 178 | |
179 | - if(!empty($cacheData) && is_numeric($cacheData)) { |
|
179 | + if (!empty($cacheData) && is_numeric($cacheData)) { |
|
180 | 180 | $this->putCache($cacheKey, (int)($cacheData + $amount), $namespace); |
181 | 181 | $this->setMessage($this->getMessage(), $this->isSuccess()); |
182 | 182 | return true; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * @param string|int $ttl |
201 | 201 | * @return void |
202 | 202 | */ |
203 | - public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string|int $ttl = 3600) |
|
203 | + public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string | int $ttl = 3600) |
|
204 | 204 | { |
205 | 205 | $this->cacheStore->putCache($cacheKey, $cacheData, $namespace, $ttl); |
206 | 206 | $this->setMessage($this->cacheStore->getMessage(), $this->cacheStore->isSuccess()); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * @param string $namespace |
224 | 224 | * @return mixed |
225 | 225 | */ |
226 | - public function renewCache(string $cacheKey, string|int $ttl = 3600, string $namespace = '') |
|
226 | + public function renewCache(string $cacheKey, string | int $ttl = 3600, string $namespace = '') |
|
227 | 227 | { |
228 | 228 | $renewedCache = $this->cacheStore->renewCache($cacheKey, $ttl, $namespace); |
229 | 229 | |
@@ -242,11 +242,11 @@ discard block |
||
242 | 242 | * @param Closure $callback |
243 | 243 | * @return mixed |
244 | 244 | */ |
245 | - public function remember(string $cacheKey, int|string $ttl, Closure $callback) |
|
245 | + public function remember(string $cacheKey, int | string $ttl, Closure $callback) |
|
246 | 246 | { |
247 | 247 | $cachedData = $this->getCache($cacheKey, ttl: $ttl); |
248 | 248 | |
249 | - if(!empty($cachedData)) { |
|
249 | + if (!empty($cachedData)) { |
|
250 | 250 | return $cachedData; |
251 | 251 | } |
252 | 252 |