You are a developer and looking for Shopware projects?
Apply Now!
ensureBodyValid example
return
$body
;
}
return
$this
->
generateBody
(
)
;
}
/** * @return void */
public
function
ensureValidity
(
)
{
$this
->
ensureBodyValid
(
)
;
if
(
'1' ===
$this
->
getHeaders
(
)
->
getHeaderBody
(
'X-Unsent'
)
)
{
throw
new
LogicException
(
'Cannot send messages marked as "draft".'
)
;
}
parent::
ensureValidity
(
)
;
}
private
function
ensureBodyValid
(
)
: void
{
if
(
null ===
$this
->text && null ===
$this
->html && !
$this
->attachments
)
{
return
$body
;
}
return
$this
->
generateBody
(
)
;
}
/** * @return void */
public
function
ensureValidity
(
)
{
$this
->
ensureBodyValid
(
)
;
if
(
'1' ===
$this
->
getHeaders
(
)
->
getHeaderBody
(
'X-Unsent'
)
)
{
throw
new
LogicException
(
'Cannot send messages marked as "draft".'
)
;
}
parent::
ensureValidity
(
)
;
}
private
function
ensureBodyValid
(
)
: void
{
if
(
null ===
$this
->text && null ===
$this
->html && !
$this
->attachments
)
{