| Total Complexity | 8 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class MemoryCache extends CacheDriverAbstract{ |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $cache = []; |
||
| 21 | |||
| 22 | /** @inheritdoc */ |
||
| 23 | public function get($key, $default = null){ |
||
| 36 | } |
||
| 37 | |||
| 38 | /** @inheritdoc */ |
||
| 39 | public function set($key, $value, $ttl = null):bool{ |
||
| 50 | } |
||
| 51 | |||
| 52 | /** @inheritdoc */ |
||
| 53 | public function delete($key):bool{ |
||
| 54 | $this->checkKey($key); |
||
| 55 | |||
| 56 | unset($this->cache[$key]); |
||
| 57 | |||
| 58 | return true; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** @inheritdoc */ |
||
| 62 | public function clear():bool{ |
||
| 66 | } |
||
| 67 | |||
| 69 |