| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | final class After |
||
| 19 | { |
||
| 20 | /** @var \DateTimeInterface */ |
||
| 21 | private $dateTime; |
||
| 22 | |||
| 23 | private function __construct(\DateTimeInterface $dateTime) |
||
| 24 | { |
||
| 25 | $this->dateTime = $dateTime; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function __toString() |
||
| 29 | { |
||
| 30 | return $this->dateTime->format('Y-m-d\TH:i'); |
||
| 31 | } |
||
| 32 | |||
| 33 | public static function fromString(string $dateTime): self |
||
| 40 | } |
||
| 41 | |||
| 42 | public static function fromDateTime(\DateTime $dateTime): self |
||
| 47 |