public function setSameSite(string $sameSite = null): self
    {
        if (! \in_array($sameSite, [self::LAX, self::STRICT, null], true)) {
            throw new InvalidSameSiteTypeException(
                'The "sameSite" parameter value is not valid.'
            );
        }

        $this->sameSite = $sameSite;

        return $this;
    }