Total Complexity | 6 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | final class CacheItem |
||
19 | { |
||
20 | private ?int $expiry; |
||
21 | private float $created; |
||
22 | |||
23 | public function __construct(?int $expiry) |
||
24 | { |
||
25 | $this->expiry = $expiry; |
||
26 | $this->created = microtime(true); |
||
27 | } |
||
28 | |||
29 | public function expiry(?int $expiry): void |
||
32 | } |
||
33 | |||
34 | public function expired(float $beta): bool |
||
58 |