| Conditions | 5 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function resolve(string|int|null $ttl): int |
||
| 28 | { |
||
| 29 | $ttlToUse = $ttl; |
||
| 30 | |||
| 31 | if ($this->defaultTTL !== null && ($ttl === null || (int) $ttl === 3600)) { |
||
| 32 | $ttlToUse = $this->defaultTTL; |
||
| 33 | } |
||
| 34 | |||
| 35 | if (is_string($ttlToUse)) { |
||
| 36 | $ttlToUse = (int) CacheFileHelper::convertExpirationToSeconds($ttlToUse); |
||
| 37 | } |
||
| 38 | |||
| 39 | return (int) $ttlToUse; |
||
| 40 | } |
||
| 42 |