src/Valkyrja/HttpMessage/Cookie.php
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;
    }
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;
    }
Set whether the cookie will be available for cross-site requests.

@param string $sameSite

@throws \Valkyrja\Http\Exceptions\InvalidSameSiteTypeException

@return \Valkyrja\HttpMessage\Cookie