Improved DateRange to check if both wrapped dates are empty

This commit is contained in:
Alejandro Celaya
2016-07-21 10:03:37 +02:00
parent 45d194aced
commit bdd2d6f8b2
2 changed files with 9 additions and 1 deletions

View File

@@ -33,4 +33,12 @@ class DateRange
{
return $this->endDate;
}
/**
* @return bool
*/
public function isEmpty()
{
return is_null($this->startDate) && is_null($this->endDate);
}
}