@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | /** |
45 | 45 | * @var array |
46 | - */ |
|
46 | + */ |
|
47 | 47 | public array $options = []; |
48 | 48 | |
49 | 49 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @param int|string $ttl |
68 | 68 | * @return bool |
69 | 69 | */ |
70 | - public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600) |
|
70 | + public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600) |
|
71 | 71 | { |
72 | 72 | if (!empty($this->getCache($cacheKey, $namespace))) { |
73 | 73 | return true; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @param string|int $ttl |
158 | 158 | * @return CacheDataFormatter|mixed |
159 | 159 | */ |
160 | - public function getCache(string $cacheKey, string $namespace = '', string|int $ttl = 3600) |
|
160 | + public function getCache(string $cacheKey, string $namespace = '', string | int $ttl = 3600) |
|
161 | 161 | { |
162 | 162 | $start = microtime(true); |
163 | 163 | $cacheData = $this->cacheStore->getCache($cacheKey, $namespace, $ttl); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | { |
195 | 195 | $cacheData = $this->getCache($cacheKey, $namespace); |
196 | 196 | |
197 | - if(!empty($cacheData) && is_numeric($cacheData)) { |
|
197 | + if (!empty($cacheData) && is_numeric($cacheData)) { |
|
198 | 198 | $this->putCache($cacheKey, (int)($cacheData + $amount), $namespace); |
199 | 199 | $this->setMessage($this->getMessage(), $this->isSuccess()); |
200 | 200 | return true; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * @param string|int $ttl |
219 | 219 | * @return void |
220 | 220 | */ |
221 | - public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string|int $ttl = 3600) |
|
221 | + public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string | int $ttl = 3600) |
|
222 | 222 | { |
223 | 223 | $start = microtime(true); |
224 | 224 | $this->cacheStore->putCache($cacheKey, $cacheData, $namespace, $ttl); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | * @param string $namespace |
245 | 245 | * @return mixed |
246 | 246 | */ |
247 | - public function renewCache(string $cacheKey, string|int $ttl = 3600, string $namespace = '') |
|
247 | + public function renewCache(string $cacheKey, string | int $ttl = 3600, string $namespace = '') |
|
248 | 248 | { |
249 | 249 | $renewedCache = $this->cacheStore->renewCache($cacheKey, $ttl, $namespace); |
250 | 250 | |
@@ -263,11 +263,11 @@ discard block |
||
263 | 263 | * @param Closure $callback |
264 | 264 | * @return mixed |
265 | 265 | */ |
266 | - public function remember(string $cacheKey, int|string $ttl, Closure $callback) |
|
266 | + public function remember(string $cacheKey, int | string $ttl, Closure $callback) |
|
267 | 267 | { |
268 | 268 | $cachedData = $this->getCache($cacheKey, ttl: $ttl); |
269 | 269 | |
270 | - if(!empty($cachedData)) { |
|
270 | + if (!empty($cachedData)) { |
|
271 | 271 | return $cachedData; |
272 | 272 | } |
273 | 273 |