diff --git a/src/QUI/ERP/Customer/Customers.php b/src/QUI/ERP/Customer/Customers.php index 04398f7b8d6f19f929f61b7f9878be83a7539ce8..3c7da2feb3aa122a81f6382b1294fe7217972b52 100644 --- a/src/QUI/ERP/Customer/Customers.php +++ b/src/QUI/ERP/Customer/Customers.php @@ -104,11 +104,11 @@ public function createCustomer($customerId, array $address = [], array $groupIds $Address->save(); - if (!$User->getAttribute('firstname') || $User->getAttribute('firstname') === '') { + if (empty($User->getAttribute('firstname'))) { $User->setAttribute('firstname', $address['firstname']); } - if (!$User->getAttribute('lastname') || $User->getAttribute('lastname') === '') { + if (empty($User->getAttribute('lastname'))) { $User->setAttribute('lastname', $address['lastname']); } } @@ -221,8 +221,8 @@ public function getCustomerGroup(): ?QUI\Groups\Group * @throws QUI\Users\Exception */ public function addUserToCustomerGroup( - bool|int|string $userId, - QUI\Interfaces\Users\User $PermissionUser = null + bool | int | string $userId, + null | QUI\Interfaces\Users\User $PermissionUser = null ): void { if (!$userId) { return; @@ -258,7 +258,7 @@ public function addUserToCustomerGroup( * @throws QUI\Exception * @throws QUI\Users\Exception */ - public function removeUserFromCustomerGroup(bool|int|string $userId): void + public function removeUserFromCustomerGroup(bool | int | string $userId): void { $customerGroup = null; @@ -287,7 +287,7 @@ public function removeUserFromCustomerGroup(bool|int|string $userId): void * @throws QUI\Permissions\Exception * @throws QUI\Users\Exception */ - public function setAttributesToCustomer(bool|int|string $userId, array $attributes): void + public function setAttributesToCustomer(bool | int | string $userId, array $attributes): void { $User = QUI::getUsers()->get($userId); diff --git a/src/QUI/ERP/Customer/OpenItemsList/OutputProvider.php b/src/QUI/ERP/Customer/OpenItemsList/OutputProvider.php index 8a78f318b1f3360a2599a809c72e38cf97ff9e06..0966f0d311bc39cfaf6be2e465b3581de6bb0322 100644 --- a/src/QUI/ERP/Customer/OpenItemsList/OutputProvider.php +++ b/src/QUI/ERP/Customer/OpenItemsList/OutputProvider.php @@ -37,7 +37,7 @@ public static function getEntityType(): string * @param Locale|null $Locale $Locale (optional) - If ommitted use \QUI::getLocale() * @return string */ - public static function getEntityTypeTitle(Locale $Locale = null): string + public static function getEntityTypeTitle(null | Locale $Locale = null): string { if (empty($Locale)) { $Locale = QUI::getLocale();