Conditions | 4 |
Paths | 3 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public static function validateCacheItem(array $item, ?callable $exceptionFactory = null) |
||
15 | { |
||
16 | if (!isset($item['cacheKey']) || !isset($item['cacheData'])) { |
||
17 | if ($exceptionFactory) { |
||
18 | throw $exceptionFactory("Each item must contain 'cacheKey' and 'cacheData'"); |
||
19 | } |
||
20 | throw new InvalidArgumentException("Each item must contain 'cacheKey' and 'cacheData'"); |
||
21 | } |
||
52 | } |