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