Upgrade PHPStan level to 3

[MAILPOET-1915]
This commit is contained in:
Pavel Dohnal
2019-03-20 11:28:22 +01:00
committed by M. Shull
parent 7b3f230081
commit 7d6f69ec1d
11 changed files with 17 additions and 15 deletions

View File

@@ -76,9 +76,7 @@ class Subscriber extends Model {
function delete() {
// WP Users cannot be deleted
if ($this->isWPUser() || $this->isWooCommerceUser()) {
return false;
} else {
if (!$this->isWPUser() && !$this->isWooCommerceUser()) {
// delete all relations to segments
SubscriberSegment::deleteSubscriptions($this);
// delete all relations to custom fields