| 1 | <?php |
||
| 10 | class VehicleInspection |
||
| 11 | { |
||
| 12 | /** @var string */ |
||
| 13 | private $id; |
||
| 14 | |||
| 15 | /** @var \DateTime */ |
||
| 16 | private $lastInspection; |
||
| 17 | |||
| 18 | /** @var \DateTime */ |
||
| 19 | private $upcomingInspection; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * VehicleInspection constructor. |
||
| 23 | * |
||
| 24 | * @param $id |
||
| 25 | * @param $lastInspection |
||
| 26 | * @param $upcomingInspection |
||
| 27 | */ |
||
| 28 | private function __construct($id, $lastInspection, $upcomingInspection) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param $id |
||
| 37 | * @param $lastInspection |
||
| 38 | * @param $upcomingInspection |
||
| 39 | * |
||
| 40 | * @throws \Madkom\RegistryApplication\Domain\CarManagement\CarExceptions\InvalidDatesException |
||
| 41 | * |
||
| 42 | * @return \Madkom\RegistryApplication\Domain\CarManagement\VehicleInspection\VehicleInspection |
||
| 43 | */ |
||
| 44 | public static function createVehicleInspection($id, $lastInspection, $upcomingInspection) |
||
| 52 | |||
| 53 | /** @return \DateTime $this->lastInspection */ |
||
| 54 | public function getLastInspection() |
||
| 58 | |||
| 59 | /** @return \DateTime $this->upcomingInspection */ |
||
| 60 | public function getUpcomingInspection() |
||
| 64 | |||
| 65 | /** @return string $this->id */ |
||
| 66 | public function getId() |
||
| 70 | } |
||
| 71 |