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 week 00:00:00'); |
|
41 | 2 | $offset = $offset_time->getTimestamp() - $this->time->getTimestamp(); // offset to next week |
|
42 | |||
43 | 2 | return $offset + rand(0, 604800); // 604800 is a 1 week |
|
44 | } |
||
45 | } |
||
46 |