Update PHPStan

[MAILPOET-3203]
This commit is contained in:
Rostislav Wolny
2020-10-19 16:32:08 +02:00
committed by Veljko V
parent f087ed8348
commit e43819920d
3 changed files with 30 additions and 18 deletions

View File

@ -393,7 +393,7 @@ class Pages {
}
public function getManageLink($params) {
if (!$this->subscriber) return $this->wp->__('Link to subscription management page is only available to mailing lists subscribers.', 'mailpoet');
if (!$this->subscriber instanceof Subscriber) return __('Link to subscription management page is only available to mailing lists subscribers.', 'mailpoet');
// get label or display default label
$text = (
@ -402,8 +402,6 @@ class Pages {
: $this->wp->__('Manage your subscription', 'mailpoet')
);
return '<a href="' . $this->subscriptionUrlFactory->getManageUrl(
$this->subscriber ?: null
) . '">' . $text . '</a>';
return '<a href="' . $this->subscriptionUrlFactory->getManageUrl($this->subscriber) . '">' . $text . '</a>';
}
}