Passed
Pull Request — main (#52)
by Sílvio
03:18
created
src/Helpers/CacheRedisHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
   */
23 23
   public static function serialize(mixed $data, bool $serialize = true): mixed
24 24
   {
25
-    if($serialize) {
25
+    if ($serialize) {
26 26
       return serialize($data);
27 27
     }
28 28
 
Please login to merge, or discard this patch.
src/Service/CacheMutator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     * @param int|string $ttl
37 37
     * @return bool
38 38
     */
39
-    public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600): bool
39
+    public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600): bool
40 40
     {
41 41
         if (!empty($this->cacheer->getCache($cacheKey, $namespace))) {
42 42
             return true;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      * @param int|string $ttl
151 151
      * @return bool
152 152
      */
153
-    public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600): bool
153
+    public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600): bool
154 154
     {
155 155
         $data = CacheerHelper::prepareForStorage($cacheData, $this->cacheer->isCompressionEnabled(), $this->cacheer->getEncryptionKey());
156 156
         $this->cacheer->cacheStore->putCache($cacheKey, $data, $namespace, $ttl);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     * @param string $namespace
184 184
     * @return bool
185 185
     */
186
-    public function renewCache(string $cacheKey, int|string $ttl = 3600, string $namespace = ''): bool
186
+    public function renewCache(string $cacheKey, int | string $ttl = 3600, string $namespace = ''): bool
187 187
     {
188 188
         $this->cacheer->cacheStore->renewCache($cacheKey, $ttl, $namespace);
189 189
         $this->cacheer->syncState();
Please login to merge, or discard this patch.
src/Cacheer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /**
51 51
     * @var FileCacheStore|DatabaseCacheStore|RedisCacheStore|ArrayCacheStore
52 52
     */
53
-    public RedisCacheStore|DatabaseCacheStore|ArrayCacheStore|FileCacheStore $cacheStore;
53
+    public RedisCacheStore | DatabaseCacheStore | ArrayCacheStore | FileCacheStore $cacheStore;
54 54
 
55 55
     /**
56 56
     * @var array
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     * @param int|string $ttl
93 93
     * @return bool
94 94
     */
95
-    public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600): bool
95
+    public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600): bool
96 96
     {
97 97
         return $this->mutator->add($cacheKey, $cacheData, $namespace, $ttl);
98 98
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     * @param string|int $ttl
189 189
     * @return CacheDataFormatter|mixed
190 190
     */
191
-    public function getCache(string $cacheKey, string $namespace = '', string|int $ttl = 3600): mixed
191
+    public function getCache(string $cacheKey, string $namespace = '', string | int $ttl = 3600): mixed
192 192
     {
193 193
         return $this->retriever->getCache($cacheKey, $namespace, $ttl);
194 194
     }
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     * @param string|int $ttl
202 202
     * @return CacheDataFormatter|array
203 203
      */
204
-    public function getMany(array $cacheKeys, string $namespace = '', string|int $ttl = 3600): CacheDataFormatter|array
204
+    public function getMany(array $cacheKeys, string $namespace = '', string | int $ttl = 3600): CacheDataFormatter | array
205 205
     {
206 206
         return $this->retriever->getMany($cacheKeys, $namespace, $ttl);
207 207
     }
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     * @param string|int $ttl
251 251
     * @return bool
252 252
     */
253
-    public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string|int $ttl = 3600): bool
253
+    public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', string | int $ttl = 3600): bool
254 254
     {
255 255
         return $this->mutator->putCache($cacheKey, $cacheData, $namespace, $ttl);
256 256
     }
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
     * @param string $namespace
277 277
     * @return bool
278 278
     */
279
-    public function renewCache(string $cacheKey, string|int $ttl = 3600, string $namespace = ''): bool
279
+    public function renewCache(string $cacheKey, string | int $ttl = 3600, string $namespace = ''): bool
280 280
     {
281 281
         return $this->mutator->renewCache($cacheKey, $ttl, $namespace);
282 282
     }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     * @param Closure $callback
290 290
     * @return mixed
291 291
     */
292
-    public function remember(string $cacheKey, int|string $ttl, Closure $callback): mixed
292
+    public function remember(string $cacheKey, int | string $ttl, Closure $callback): mixed
293 293
     {
294 294
         return $this->retriever->remember($cacheKey, $ttl, $callback);
295 295
     }
Please login to merge, or discard this patch.