/** * @return SetCookie */ private function getExpirationCookie() : SetCookie { $currentTimeProvider = $this->currentTimeProvider; $expirationDate = $currentTimeProvider(); $expirationDate = $expirationDate->modify('-30 days'); return $this->defaultCookie->withValue(null)->withExpires($expirationDate->getTimestamp()); }
/** * @return SetCookie */ private function getExpirationCookie() : SetCookie { return $this->defaultCookie->withValue(null)->withExpires((new \DateTime('-30 day'))->getTimestamp()); }