Init $customerRoleAdded on WooCommerceTest.php
This will make it non-nullable and have only the type bool. [MAILPOET-3720]
This commit is contained in:
@ -24,7 +24,7 @@ require_once('WPTestUser.php');
|
||||
|
||||
class WooCommerceTest extends \MailPoetTest {
|
||||
/** @var bool */
|
||||
public $customerRoleAdded;
|
||||
public $customerRoleAdded = false;
|
||||
|
||||
/** @var string[] */
|
||||
private $userEmails = [];
|
||||
@ -621,7 +621,7 @@ class WooCommerceTest extends \MailPoetTest {
|
||||
}
|
||||
|
||||
private function removeCustomerRole(): void {
|
||||
if (!empty($this->customerRoleAdded)) {
|
||||
if ($this->customerRoleAdded) {
|
||||
remove_role('customer');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user