src/Http/src/Cookie.php
private function freezeExpiration(DateTimeInterface $expires): DateTimeImmutable
    {
        if (!$expires instanceof DateTimeImmutable) {
            $expires = new DateTimeImmutable($expires->format(DateTime::ISO8601), $expires->getTimezone());
        }

        return $expires;
    }
private function freezeExpiration(DateTimeInterface $expires): DateTimeImmutable
    {
        if (!$expires instanceof DateTimeImmutable) {
            $expires = new DateTimeImmutable($expires->format(DateTime::ISO8601), $expires->getTimezone());
        }

        return $expires;
    }
private function freezeExpiration ( DateTimeInterface $ expires ) : DateTimeImmutable { if ( ! $ expires instanceof DateTimeImmutable ) { $ expires = new DateTimeImmutable ( $ expires -> format ( DateTime :: ISO8601 ) , $ expires -> getTimezone ( ) ) ; } return $ expires ; }
Creates immutable date time instance from the provided one.

@param DateTimeInterface $expires
@return DateTimeImmutable
Creates immutable date time instance from the provided one .