| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 8 |
| Ratio | 100 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | 2 | public function getSeconds() |
|
| 38 | { |
||
| 39 | 2 | $offset_time = clone $this->time; |
|
| 40 | 2 | $offset_time->modify('+1 day 00:00:00'); |
|
| 41 | 2 | $offset = $offset_time->getTimestamp() - $this->time->getTimestamp(); // offset to next day |
|
| 42 | |||
| 43 | 2 | return $offset + rand(0, 86400); // 86400 is a 1 day |
|
| 44 | } |
||
| 45 | } |
||
| 46 |