Passed
Push — main ( db4fe2...384d6d )
by Sílvio
05:16 queued 02:22
created
src/Cacheer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param int|string $ttl
70 70
      * @return bool
71 71
      */
72
-    public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600)
72
+    public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600)
73 73
     {
74 74
         if (!empty($this->getCache($cacheKey, $namespace))) {
75 75
             return true;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      * @param string|int $ttl
160 160
      * @return CacheDataFormatter|mixed
161 161
      */
162
-    public function getCache(string $cacheKey, string $namespace = '', string|int $ttl = 3600)
162
+    public function getCache(string $cacheKey, string $namespace = '', string | int $ttl = 3600)
163 163
     {
164 164
         $cacheData = $this->cacheStore->getCache($cacheKey, $namespace, $ttl);
165 165
         $this->setMessage($this->cacheStore->getMessage(), $this->cacheStore->isSuccess());
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     {
193 193
         $cacheData = $this->getCache($cacheKey, $namespace);
194 194
 
195
-        if(!empty($cacheData) && is_numeric($cacheData)) {
195
+        if (!empty($cacheData) && is_numeric($cacheData)) {
196 196
             $this->putCache($cacheKey, (int)($cacheData + $amount), $namespace);
197 197
             $this->setMessage($this->getMessage(), $this->isSuccess());
198 198
             return true;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      * @param string|int $ttl
217 217
      * @return void
218 218
      */
219
-    public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string|int $ttl = 3600)
219
+    public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string | int $ttl = 3600)
220 220
     {
221 221
         $data = $this->prepareForStorage($cacheData);
222 222
         $this->cacheStore->putCache($cacheKey, $data, $namespace, $ttl);
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      * @param string $namespace
241 241
      * @return void
242 242
      */
243
-    public function renewCache(string $cacheKey, string|int $ttl = 3600, string $namespace = '')
243
+    public function renewCache(string $cacheKey, string | int $ttl = 3600, string $namespace = '')
244 244
     {
245 245
         $this->cacheStore->renewCache($cacheKey, $ttl, $namespace);
246 246
 
@@ -257,11 +257,11 @@  discard block
 block discarded – undo
257 257
      * @param Closure $callback
258 258
      * @return mixed
259 259
      */
260
-    public function remember(string $cacheKey, int|string $ttl, Closure $callback)
260
+    public function remember(string $cacheKey, int | string $ttl, Closure $callback)
261 261
     {
262 262
         $cachedData = $this->getCache($cacheKey, ttl: $ttl);
263 263
 
264
-        if(!empty($cachedData)) {
264
+        if (!empty($cachedData)) {
265 265
             return $cachedData;
266 266
         }
267 267
 
Please login to merge, or discard this patch.