Ensure IEMail::getMessage returns a string
This commit is contained in:
parent
2a4985cd46
commit
a147038c2e
|
@ -80,7 +80,7 @@ interface IEmail extends JsonSerializable
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getMessage(bool $plain = false);
|
function getMessage(bool $plain = false): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the additional mail header array
|
* Gets the additional mail header array
|
||||||
|
|
|
@ -110,12 +110,12 @@ class Email implements IEmail
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function getMessage(bool $plain = false)
|
public function getMessage(bool $plain = false): string
|
||||||
{
|
{
|
||||||
if ($plain) {
|
if ($plain) {
|
||||||
return $this->msgText;
|
return $this->msgText;
|
||||||
} else {
|
} else {
|
||||||
return $this->msgHtml;
|
return $this->msgHtml ?? '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user