Refactor mailerInstance property to mailerMethod

Naming mailerInstance was confusing since
it is not instance of Mailer class but instance of MailerMethod.
[MAILPOET-4115]
This commit is contained in:
Rostislav Wolny
2022-04-05 16:27:19 +02:00
committed by Veljko V
parent 708333e68a
commit 789385b0c4
5 changed files with 24 additions and 24 deletions

View File

@@ -53,7 +53,7 @@ class Mailer {
}
public function getProcessingMethod() {
return ($this->mailer->mailerInstance instanceof MailPoet) ?
return ($this->mailer->mailerMethod instanceof MailPoet) ?
'bulk' :
'individual';
}
@@ -66,7 +66,7 @@ class Mailer {
if ($this->getProcessingMethod() === 'individual') {
throw new \LogicException('Trying to send a batch with individual processing method');
}
return $this->mailer->mailerInstance->send(
return $this->mailer->mailerMethod->send(
$preparedNewsletters,
$preparedSubscribers,
$extraParams
@@ -77,7 +77,7 @@ class Mailer {
if ($this->getProcessingMethod() === 'bulk') {
throw new \LogicException('Trying to send an individual email with a bulk processing method');
}
return $this->mailer->mailerInstance->send(
return $this->mailer->mailerMethod->send(
$preparedNewsletter,
$preparedSubscriber,
$extraParams