Add annotation for the Bridge property
[MAILPOET-4047]
This commit is contained in:
@@ -10,6 +10,7 @@ use MailPoet\WP\Functions as WPFunctions;
|
|||||||
use MailPoetVendor\Carbon\Carbon;
|
use MailPoetVendor\Carbon\Carbon;
|
||||||
|
|
||||||
abstract class KeyCheckWorker extends SimpleWorker {
|
abstract class KeyCheckWorker extends SimpleWorker {
|
||||||
|
/** @var Bridge|null */
|
||||||
public $bridge;
|
public $bridge;
|
||||||
|
|
||||||
/** @var CronWorkerScheduler */
|
/** @var CronWorkerScheduler */
|
||||||
|
@@ -25,6 +25,9 @@ class PremiumKeyCheck extends KeyCheckWorker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function checkKey() {
|
public function checkKey() {
|
||||||
|
// for phpstan because we set bridge property in the init function
|
||||||
|
if (!$this->bridge) return;
|
||||||
|
|
||||||
$premiumKey = $this->settings->get(Bridge::PREMIUM_KEY_SETTING_NAME);
|
$premiumKey = $this->settings->get(Bridge::PREMIUM_KEY_SETTING_NAME);
|
||||||
$result = $this->bridge->checkPremiumKey($premiumKey);
|
$result = $this->bridge->checkPremiumKey($premiumKey);
|
||||||
$this->bridge->storePremiumKeyAndState($premiumKey, $result);
|
$this->bridge->storePremiumKeyAndState($premiumKey, $result);
|
||||||
|
@@ -46,6 +46,9 @@ class SendingServiceKeyCheck extends KeyCheckWorker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function checkKey() {
|
public function checkKey() {
|
||||||
|
// for phpstan because we set bridge property in the init function
|
||||||
|
if (!$this->bridge) return;
|
||||||
|
|
||||||
$wasPendingApproval = $this->servicesChecker->isMailPoetAPIKeyPendingApproval();
|
$wasPendingApproval = $this->servicesChecker->isMailPoetAPIKeyPendingApproval();
|
||||||
|
|
||||||
$mssKey = $this->settings->get(Mailer::MAILER_CONFIG_SETTING_NAME)['mailpoet_api_key'];
|
$mssKey = $this->settings->get(Mailer::MAILER_CONFIG_SETTING_NAME)['mailpoet_api_key'];
|
||||||
|
Reference in New Issue
Block a user