public function setError($errorCode = null, $message = null):ErrorResponseBuilder
    {
        $this->errorCode = $errorCode;

        if (is_array($message)) {
            $this->parameters = $message;
        } else {
            $this->message = $message;
        }

        return $this;
    }
public function setError($errorCode = null, $message = null):ErrorResponseBuilder
    {
        $this->errorCode = $errorCode;

        if (is_array($message)) {
            $this->parameters = $message;
        } else {
            $this->message = $message;
        }

        return $this;
    }
public function setError ( $ errorCode = null , $ message = null ) : ErrorResponseBuilder { $ this -> errorCode = $ errorCode ; if ( is_array ( $ message ) ) { $ this -> parameters = $ message ; } else { $ this -> message = $ message ; } return $ this ; }
Set the error code and optionally an error message.

@param  mixed|null       $errorCode
@param  string|array|null $message
@return self
Set the error code and optionally an error message .