src/Invoice/Result.php
public function getLogText($addReqResp)
    {
        $action = $this->getActionText();
        $reason = $this->getSendStatusText();
        $message = sprintf($this->t('message_invoice_reason'), $action, $reason);

        if ($this->hasBeenSent() || $this->getSendStatus() === self::NotSent_LocalErrors) {
            if ($this->hasBeenSent()) {
                $message .= ' ' . $this->getStatusText();
            }
            if ($this->hasMessages()) {
                $message .= "\n" . $this->getMessages(Result::Format_FormattedText);
            }
            if ($addReqResp === Result::AddReqResp_Always || ($addReqResp === Result::AddReqResp_WithOther && $this->hasMessages())) {
                $message .= ' ' . $this->getRawRequestResponse(Result::Format_FormattedText);
            }
        }
        return $message;
    }
public function getLogText($addReqResp)
    {
        $action = $this->getActionText();
        $reason = $this->getSendStatusText();
        $message = sprintf($this->t('message_invoice_reason'), $action, $reason);

        if ($this->hasBeenSent() || $this->getSendStatus() === self::NotSent_LocalErrors) {
            if ($this->hasBeenSent()) {
                $message .= ' ' . $this->getStatusText();
            }
            if ($this->hasMessages()) {
                $message .= "\n" . $this->getMessages(Result::Format_FormattedText);
            }
            if ($addReqResp === Result::AddReqResp_Always || ($addReqResp === Result::AddReqResp_WithOther && $this->hasMessages())) {
                $message .= ' ' . $this->getRawRequestResponse(Result::Format_FormattedText);
            }
        }
        return $message;
    }
public function getLogText ( $ addReqResp ) { $ action = $ this -> getActionText ( ) ; $ reason = $ this -> getSendStatusText ( ) ; $ message = sprintf ( $ this -> t ( 'message_invoice_reason' ) , $ action , $ reason ) ; if ( $ this -> hasBeenSent ( ) || $ this -> getSendStatus ( ) === self :: NotSent_LocalErrors ) { if ( $ this -> hasBeenSent ( ) ) { $ message .= ' ' . $ this -> getStatusText ( ) ; } if ( $ this -> hasMessages ( ) ) { $ message .= "\n" . $ this -> getMessages ( Result :: Format_FormattedText ) ; } if ( $ addReqResp === Result :: AddReqResp_Always || ( $ addReqResp === Result :: AddReqResp_WithOther && $ this -> hasMessages ( ) ) ) { $ message .= ' ' . $ this -> getRawRequestResponse ( Result :: Format_FormattedText ) ; } } return $ message ; }
Returns a translated sentence that can be used for logging.

The returned sentence indicated what happened and why. If the invoice was
sent or local errors prevented it being sent, then the returned string
also includes any messages (warnings, errors, or exception).

@param int $addReqResp
Whether to add the raw request and response.
One of the Result::AddReqResp_... constants

@return string
Returns a translated sentence that can be used for logging .