| Total Complexity | 10 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | trait Periods |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Sync periods times |
||
| 11 | */ |
||
| 12 | protected function periodsSync() |
||
| 23 | } |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param $periodKey |
||
| 29 | * @return bool |
||
| 30 | */ |
||
| 31 | protected function noExpiration($periodKey) |
||
| 32 | { |
||
| 33 | return $this->redis->ttl($periodKey) == -1 || !$this->redis->exists($periodKey); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param $period |
||
| 38 | * @return int |
||
| 39 | */ |
||
| 40 | protected function newExpiration($period) |
||
| 60 | } |
||
| 61 | } |
||
| 62 |