| Total Complexity | 3 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | abstract class AbstractValue |
||
| 8 | { |
||
| 9 | private static array $cache = []; |
||
| 10 | |||
| 11 | 13 | protected static function cacheRetrieve($key): ?object |
|
| 12 | { |
||
| 13 | 13 | return self::$cache[self::getCacheKey($key)] ?? null; |
|
| 14 | } |
||
| 15 | |||
| 16 | 5 | protected static function cacheStore($key, object $object): void |
|
| 17 | { |
||
| 18 | 5 | self::$cache[self::getCacheKey($key)] = $object; |
|
| 19 | 5 | } |
|
| 20 | |||
| 21 | 13 | private static function getCacheKey($key): string |
|
| 24 | } |
||
| 25 | } |
||
| 26 |