From cb41e3f91d435adfa6f0fb23eb3ee1d143cb6470 Mon Sep 17 00:00:00 2001 From: Can Demiralp Date: Tue, 18 Feb 2025 16:00:22 +0100 Subject: [PATCH] [ECP-8888] Update the condition and remove unnecessary cast --- Helper/PaymentMethods.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Helper/PaymentMethods.php b/Helper/PaymentMethods.php index 362004a18..5a9d2c8da 100644 --- a/Helper/PaymentMethods.php +++ b/Helper/PaymentMethods.php @@ -1092,8 +1092,8 @@ public function isOpenInvoice(MethodInterface $paymentMethodInstance): bool public function getRequiresLineItems(MethodInterface $paymentMethodInstance): bool { $isOpenInvoice = $this->isOpenInvoice($paymentMethodInstance); - $requiresLineItems = boolval($paymentMethodInstance->getConfigData(self::CONFIG_FIELD_REQUIRES_LINE_ITEMS)); + $requiresLineItemsConfig = boolval($paymentMethodInstance->getConfigData(self::CONFIG_FIELD_REQUIRES_LINE_ITEMS)); - return ($isOpenInvoice === true || $requiresLineItems === true); + return ($isOpenInvoice || $requiresLineItemsConfig); } }