@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | { |
14 | 14 | |
15 | 15 | /** |
16 | - * @param string $expiration |
|
17 | - * @return int |
|
18 | - */ |
|
16 | + * @param string $expiration |
|
17 | + * @return int |
|
18 | + */ |
|
19 | 19 | public static function convertExpirationToSeconds(string $expiration) |
20 | 20 | { |
21 | 21 | $units = [ |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
66 | - * @param string|int $ttl |
|
67 | - * @param int $defaultTTL |
|
68 | - * @return mixed |
|
69 | - */ |
|
66 | + * @param string|int $ttl |
|
67 | + * @param int $defaultTTL |
|
68 | + * @return mixed |
|
69 | + */ |
|
70 | 70 | public static function ttl($ttl = null, ?int $defaultTTL = null) { |
71 | 71 | if ($ttl) { |
72 | 72 | $ttl = is_string($ttl) ? CacheFileHelper::convertExpirationToSeconds($ttl) : $ttl; |
@@ -76,19 +76,19 @@ discard block |
||
76 | 76 | return $ttl; |
77 | 77 | } |
78 | 78 | |
79 | - /** |
|
80 | - * @param mixed $currentCacheData |
|
81 | - * @param mixed $cacheData |
|
82 | - * @return array |
|
83 | - */ |
|
84 | - public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData) |
|
85 | - { |
|
79 | + /** |
|
80 | + * @param mixed $currentCacheData |
|
81 | + * @param mixed $cacheData |
|
82 | + * @return array |
|
83 | + */ |
|
84 | + public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData) |
|
85 | + { |
|
86 | 86 | if (is_array($currentCacheData) && is_array($cacheData)) { |
87 | - $mergedCacheData = array_merge($currentCacheData, $cacheData); |
|
87 | + $mergedCacheData = array_merge($currentCacheData, $cacheData); |
|
88 | 88 | } else { |
89 | - $mergedCacheData = array_merge((array)$currentCacheData, (array)$cacheData); |
|
89 | + $mergedCacheData = array_merge((array)$currentCacheData, (array)$cacheData); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | return $mergedCacheData; |
93 | - } |
|
93 | + } |
|
94 | 94 | } |
@@ -15,9 +15,9 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | /** |
18 | - * @param array|null $database |
|
19 | - * @return PDO|null |
|
20 | - */ |
|
18 | + * @param array|null $database |
|
19 | + * @return PDO|null |
|
20 | + */ |
|
21 | 21 | public static function createConnection(?array $database = null) |
22 | 22 | { |
23 | 23 | $dbConf = $database ?? CACHEER_DATABASE_CONFIG[Connect::getConnection()]; |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | |
19 | 19 | |
20 | 20 | /** |
21 | - * @param array|null $database |
|
22 | - * @return PDO|null |
|
23 | - */ |
|
21 | + * @param array|null $database |
|
22 | + * @return PDO|null |
|
23 | + */ |
|
24 | 24 | public static function getInstance(?array $database = null) |
25 | 25 | { |
26 | 26 | $pdo = ConnectionFactory::createConnection($database); |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
34 | - * @param string $connection |
|
35 | - * @return void |
|
36 | - */ |
|
34 | + * @param string $connection |
|
35 | + * @return void |
|
36 | + */ |
|
37 | 37 | public static function setConnection(string $connection) |
38 | 38 | { |
39 | 39 | $drivers = ['mysql', 'sqlite', 'pgsql']; |
@@ -44,16 +44,16 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
47 | - * @return string |
|
48 | - */ |
|
47 | + * @return string |
|
48 | + */ |
|
49 | 49 | public static function getConnection() |
50 | 50 | { |
51 | 51 | return self::$connection; |
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
55 | - * @return PDOException|null |
|
56 | - */ |
|
55 | + * @return PDOException|null |
|
56 | + */ |
|
57 | 57 | public static function getError() |
58 | 58 | { |
59 | 59 | return self::$error; |