@@ 437-447 (lines=11) @@ | ||
434 | } else { |
|
435 | $body->setBodyContent($content); |
|
436 | } |
|
437 | if ($email->getId()) { |
|
438 | if ($body->getBodyIsText() !== ($type === true)) { |
|
439 | throw $this->createInvalidPropertyException( |
|
440 | 'Body Type', |
|
441 | $this->emailBodyTypeTransformer->transform($body->getBodyIsText()), |
|
442 | $this->emailBodyTypeTransformer->transform($type) |
|
443 | ); |
|
444 | } |
|
445 | } else { |
|
446 | $body->setBodyIsText($type === true); |
|
447 | } |
|
448 | } else { |
|
449 | $email->setEmailBody($this->emailEntityBuilder->body($content, $type !== true, true)); |
|
450 | } |
|
@@ 461-471 (lines=11) @@ | ||
458 | { |
|
459 | $body = $email->getEmailBody(); |
|
460 | if ($body) { |
|
461 | if ($email->getId()) { |
|
462 | if ($body->getBodyIsText() !== ($type === true)) { |
|
463 | throw $this->createInvalidPropertyException( |
|
464 | 'Body Type', |
|
465 | $this->emailBodyTypeTransformer->transform($body->getBodyIsText()), |
|
466 | $this->emailBodyTypeTransformer->transform($type) |
|
467 | ); |
|
468 | } |
|
469 | } else { |
|
470 | $body->setBodyIsText($type === true); |
|
471 | } |
|
472 | } else { |
|
473 | $email->setEmailBody($this->emailEntityBuilder->body('', $type !== true, true)); |
|
474 | } |