CacheDatabaseHelper::validateCacheItem()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Silviooosilva\CacheerPhp\Helpers;
4
5
use Silviooosilva\CacheerPhp\Helpers\CacheerHelper;
6
use Silviooosilva\CacheerPhp\Exceptions\CacheDatabaseException;
7
8
/**
9
 * Class CacheDatabaseHelper
10
 * @author Sílvio Silva <https://github.com/silviooosilva>
11
 * @package Silviooosilva\CacheerPhp
12
 */
13
class CacheDatabaseHelper
14
{
15
    /**
16
     * @param array $item
17
     * @return void
18
     */
19
    public static function validateCacheItem(array $item)
20
    {
21
        CacheerHelper::validateCacheItem(
22
            $item,
23
            fn($msg) => CacheDatabaseException::create($msg)
24
        );
25
    }
26
27
    /**
28
     * @param array $options
29
     * @return array
30
     */
31
    public static function mergeCacheData($cacheData)
32
    {
33
        return CacheerHelper::mergeCacheData($cacheData);
34
    }
35
36
    /**
37
     * @param mixed $currentCacheData
38
     * @param mixed $cacheData
39
     * @return array
40
     */
41
    public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData)
42
    {
43
        return CacheerHelper::arrayIdentifier($currentCacheData, $cacheData);
44
    }
45
}
46
47