| Total Complexity | 6 | 
| Total Lines | 51 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 5 | class CacheRuntime | ||
| 6 | { | ||
| 7 | protected static $cache = []; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * @param string|array $key | ||
| 11 | * | ||
| 12 | * @return mixed|null | ||
| 13 | */ | ||
| 14 | public static function get($key) | ||
| 15 |     { | ||
| 16 | return self::$cache[Cache::key($key)] ?? null; | ||
| 17 | } | ||
| 18 | |||
| 19 | /** | ||
| 20 | * @param string|array $key | ||
| 21 | * @param $value | ||
| 22 | */ | ||
| 23 | public static function set($key, $value) | ||
| 26 | } | ||
| 27 | |||
| 28 | /** | ||
| 29 | * @param string|array $key | ||
| 30 | * @param \Closure $closure | ||
| 31 | * | ||
| 32 | * @return mixed | ||
| 33 | */ | ||
| 34 | public static function getOrSet($key, \Closure $closure) | ||
| 41 | } | ||
| 42 | |||
| 43 | /** | ||
| 44 | * @param string|array $key | ||
| 45 | */ | ||
| 46 | public static function invalidate($key) | ||
| 49 | } | ||
| 50 | |||
| 51 | /** | ||
| 52 | */ | ||
| 53 | public static function clear() | ||
| 58 |