| Total Complexity | 7 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class Key |
||
| 8 | { |
||
| 9 | private $key; |
||
| 10 | private $identity; |
||
| 11 | private $ttl; |
||
| 12 | |||
| 13 | public function __construct(string $key, string $identity, int $ttl) |
||
| 14 | { |
||
| 15 | $this->key = $key; |
||
| 16 | $this->identity = $identity; |
||
| 17 | $this->ttl = $ttl > 0 ? $ttl : 0; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function key(): string |
||
| 21 | { |
||
| 22 | return $this->key; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function identity(): string |
||
| 28 | } |
||
| 29 | |||
| 30 | public function ttl(): int |
||
| 33 | } |
||
| 34 | |||
| 35 | public function expired(): bool |
||
| 38 | } |
||
| 39 | |||
| 40 | public function __toString(): string |
||
| 43 | } |
||
| 44 | } |
||
| 45 |