Inheritance: extends Exceptio\Exception
Example #1
0
 public function __construct(DateTime $startDate, DateTime $endDate)
 {
     if ($startDate > $endDate) {
         throw InvalidPeriod::startDateCannotBeAfterEndDate($startDate, $endDate);
     }
     $this->startDate = $startDate;
     $this->endDate = $endDate;
 }