| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 96 | public function expiresAfter($time) |
||
| 97 | { |
||
| 98 | if ($time === null) { |
||
| 99 | $this->expires = null; |
||
| 100 | |||
| 101 | return; |
||
| 102 | } |
||
| 103 | |||
| 104 | $this->expires = new DateTimeImmutable(); |
||
| 105 | |||
| 106 | if (! $time instanceof DateInterval) { |
||
| 107 | $time = new DateInterval(sprintf('PT%sS', $time)); |
||
| 108 | } |
||
| 109 | |||
| 110 | $this->expires = $this->expires->add($time); |
||
| 111 | |||
| 112 | return $this; |
||
| 113 | } |
||
| 123 |