@@ -14,9 +14,9 @@ discard block |
||
14 | 14 | { |
15 | 15 | |
16 | 16 | /** |
17 | - * @param string $expiration |
|
18 | - * @return int |
|
19 | - */ |
|
17 | + * @param string $expiration |
|
18 | + * @return int |
|
19 | + */ |
|
20 | 20 | public static function convertExpirationToSeconds(string $expiration) |
21 | 21 | { |
22 | 22 | $units = [ |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
61 | - * @param string|int $ttl |
|
62 | - * @param int $defaultTTL |
|
63 | - * @return mixed |
|
64 | - */ |
|
61 | + * @param string|int $ttl |
|
62 | + * @param int $defaultTTL |
|
63 | + * @return mixed |
|
64 | + */ |
|
65 | 65 | public static function ttl($ttl = null, ?int $defaultTTL = null) { |
66 | 66 | if ($ttl) { |
67 | 67 | $ttl = is_string($ttl) ? self::convertExpirationToSeconds($ttl) : $ttl; |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | return $ttl; |
72 | 72 | } |
73 | 73 | |
74 | - /** |
|
75 | - * @param mixed $currentCacheData |
|
76 | - * @param mixed $cacheData |
|
77 | - * @return array |
|
78 | - */ |
|
79 | - public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData) |
|
80 | - { |
|
74 | + /** |
|
75 | + * @param mixed $currentCacheData |
|
76 | + * @param mixed $cacheData |
|
77 | + * @return array |
|
78 | + */ |
|
79 | + public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData) |
|
80 | + { |
|
81 | 81 | return CacheerHelper::arrayIdentifier($currentCacheData, $cacheData); |
82 | - } |
|
82 | + } |
|
83 | 83 | } |
@@ -13,20 +13,20 @@ discard block |
||
13 | 13 | class CacheRedisHelper |
14 | 14 | { |
15 | 15 | |
16 | - /** |
|
17 | - * @param mixed $data |
|
18 | - * @param bool $serialize |
|
19 | - * @return mixed |
|
20 | - */ |
|
21 | - public static function serialize(mixed $data, bool $serialize = true) |
|
22 | - { |
|
16 | + /** |
|
17 | + * @param mixed $data |
|
18 | + * @param bool $serialize |
|
19 | + * @return mixed |
|
20 | + */ |
|
21 | + public static function serialize(mixed $data, bool $serialize = true) |
|
22 | + { |
|
23 | 23 | if($serialize) { |
24 | - return serialize($data); |
|
24 | + return serialize($data); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | return unserialize($data); |
28 | 28 | |
29 | - } |
|
29 | + } |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @param array $item |
@@ -49,15 +49,15 @@ discard block |
||
49 | 49 | return CacheerHelper::mergeCacheData($cacheData); |
50 | 50 | } |
51 | 51 | |
52 | - /** |
|
53 | - * @param mixed $currentCacheData |
|
54 | - * @param mixed $cacheData |
|
55 | - * @return array |
|
56 | - */ |
|
57 | - public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData) |
|
58 | - { |
|
59 | - return CacheerHelper::arrayIdentifier($currentCacheData, $cacheData); |
|
60 | - } |
|
52 | + /** |
|
53 | + * @param mixed $currentCacheData |
|
54 | + * @param mixed $cacheData |
|
55 | + * @return array |
|
56 | + */ |
|
57 | + public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData) |
|
58 | + { |
|
59 | + return CacheerHelper::arrayIdentifier($currentCacheData, $cacheData); |
|
60 | + } |
|
61 | 61 | |
62 | 62 | } |
63 | 63 |