| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 63 | public function has($key): bool |
||
| 64 | { |
||
| 65 | $this->checkReservedCharacters($key); |
||
| 66 | if (! array_key_exists($key, $this->bucket)) { |
||
| 67 | return false; |
||
| 68 | } |
||
| 69 | |||
| 70 | if ($this->bucket[$key][1] !== false && $this->bucket[$key][1] <= time()) { |
||
| 71 | $this->delete($key); |
||
| 72 | |||
| 73 | return false; |
||
| 74 | } |
||
| 75 | |||
| 76 | return true; |
||
| 77 | } |
||
| 79 |