| Total Complexity | 3 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | trait TimeTravel |
||
| 8 | { |
||
| 9 | 41 | private function _tick(int $value, string $unit = 'S'): self |
|
| 10 | { |
||
| 11 | 41 | $this->_now = $this->_now->add(new DateInterval('PT' . $value . $unit)); |
|
|
|
|||
| 12 | |||
| 13 | 41 | return $this; |
|
| 14 | } |
||
| 15 | |||
| 16 | 37 | public function advanceSeconds(int $seconds): self |
|
| 17 | { |
||
| 18 | 37 | return $this->_tick($seconds, 'S'); |
|
| 19 | } |
||
| 20 | |||
| 21 | 10 | public function advanceMinutes(int $minutes): self |
|
| 24 | } |
||
| 25 | } |
||
| 26 |