Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | class CacheDatabaseHelper |
||
14 | { |
||
15 | /** |
||
16 | * Validates a cache item. |
||
17 | * |
||
18 | * @param array $item |
||
19 | * @return void |
||
20 | */ |
||
21 | public static function validateCacheItem(array $item): void |
||
22 | { |
||
23 | CacheerHelper::validateCacheItem( |
||
24 | $item, |
||
25 | fn($msg) => CacheDatabaseException::create($msg) |
||
26 | ); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Merges cache data with existing data. |
||
31 | * |
||
32 | * @param $cacheData |
||
33 | * @return array |
||
34 | */ |
||
35 | public static function mergeCacheData($cacheData): array |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Generates an array identifier for cache data. |
||
42 | * |
||
43 | * @param mixed $currentCacheData |
||
44 | * @param mixed $cacheData |
||
45 | * @return array |
||
46 | */ |
||
47 | public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData): array |
||
50 | } |
||
51 | } |
||
53 |