Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
96 | 5 | public function expiresAfter($time) |
|
97 | { |
||
98 | 5 | $this->expires = new DateTimeImmutable(); |
|
99 | |||
100 | 5 | if (! $time instanceof DateInterval) { |
|
101 | 4 | $time = new DateInterval(sprintf('PT%sS', $time)); |
|
102 | } |
||
103 | |||
104 | 5 | $this->expires = $this->expires->add($time); |
|
105 | |||
106 | 5 | return $this; |
|
107 | } |
||
108 | |||
117 |