public function isExpired(DateTime $date = null) { $date = $date ?: new DateTime(); $expirationDate = $this->expirationDate(); return $expirationDate ? $expirationDate <= $date : false; }