Init $customerRoleAdded on WooCommerceTest.php

This will make it non-nullable and have only the type bool.

[MAILPOET-3720]
This commit is contained in:
Brezo Cordero
2022-05-19 09:57:01 -05:00
committed by Veljko V
parent 4cd3c4ed77
commit b7a37e69b7

View File

@ -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');
}
}