src/main/php/response/WebResponse.php
public function containsCookie(string $name, string $value = null): bool
    {
        if (isset($this->cookies[$name])) {
            if (null !== $value) {
                return $this->cookies[$name]->value() === $value;
            }

            return true;
        }

        return false;
    }
public function containsCookie(string $name, string $value = null): bool
    {
        if (isset($this->cookies[$name])) {
            if (null !== $value) {
                return $this->cookies[$name]->value() === $value;
            }

            return true;
        }

        return false;
    }
public function containsCookie ( string $ name , string $ value = null ) : bool { if ( isset ( $ this -> cookies [ $ name ] ) ) { if ( null !== $ value ) { return $ this -> cookies [ $ name ] -> value ( ) === $ value ; } return true ; } return false ; }
checks if response contains a certain cookie

@param   string  $name   name of cookie to check
@param   string  $value  optional  if given the value is checked as well
@return  bool
@since   4.0.0
checks if response contains a certain cookie