Exclude MailPoet data structures from camel case conversion

[MAILPOET-1796]
This commit is contained in:
Jan Jakeš
2020-01-07 17:12:09 +01:00
committed by Jan Jakeš
parent 685b4885c0
commit e66c76133e
5 changed files with 20 additions and 20 deletions

View File

@ -29,11 +29,11 @@ class AmazonSESMapper {
*/
public function getErrorFromResponse($response, $subscriber) {
$message = ($response) ?
$response->error->Message->__toString() :
$response->Error->Message->__toString() : // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
sprintf(WPFunctions::get()->__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_AMAZONSES);
$level = MailerError::LEVEL_HARD;
if ($response && $response->error->Code->__toString() === 'MessageRejected') {
if ($response && $response->Error->Code->__toString() === 'MessageRejected') { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps
$level = MailerError::LEVEL_SOFT;
}
$subscriberErrors = [new SubscriberError($subscriber, null)];