| Conditions | 4 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function get($key, $default = null) |
||
| 44 | { |
||
| 45 | $this->validateKey($key); |
||
| 46 | |||
| 47 | if (!isset($this->cache[$key])) { |
||
| 48 | return $default; |
||
| 49 | } |
||
| 50 | |||
| 51 | list($expire, $value) = $this->cache[$key]; |
||
| 52 | if (!is_null($expire) && $expire < time()) { |
||
| 53 | $this->delete($key); |
||
| 54 | |||
| 55 | return $default; |
||
| 56 | } |
||
| 57 | |||
| 58 | return $value; |
||
| 59 | } |
||
| 60 | |||
| 119 |