From 89d94ec1c4047895c38b04a2cf0d3667a8931f80 Mon Sep 17 00:00:00 2001 From: Steve Tentrop Date: Wed, 29 Jun 2022 15:27:32 +0200 Subject: [PATCH 1/2] FIX: remove is array --- src/Wizard/ShopWizard/Services/DefaultSettingsService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Wizard/ShopWizard/Services/DefaultSettingsService.php b/src/Wizard/ShopWizard/Services/DefaultSettingsService.php index ae86063a01..935d6d6a58 100644 --- a/src/Wizard/ShopWizard/Services/DefaultSettingsService.php +++ b/src/Wizard/ShopWizard/Services/DefaultSettingsService.php @@ -89,11 +89,12 @@ public function hasPaymentMethods(): bool */ public function getPluginPaymentMethodsRegistered():array { - $paymentMethods = $this->paymentRepository->allPluginPaymentMethods()->all(); + $paymentMethods = $this->paymentRepository->allPluginPaymentMethods(); + $paymentMethodContainer = pluginApp(PaymentMethodContainer::class); $pluginPaymentMethodsRegistered = []; - if (is_array($paymentMethods) && count($paymentMethods)) { + if (count($paymentMethods)) { foreach ($paymentMethods as $paymentMethod) { $registeringKey = $paymentMethod->pluginKey . '::' . $paymentMethod->paymentKey; if ($paymentMethodContainer->isRegistered($registeringKey)) { From ca16bd1140eb4dd59b1831789fbe30ade9c7ca95 Mon Sep 17 00:00:00 2001 From: Steve Tentrop Date: Wed, 29 Jun 2022 15:51:11 +0200 Subject: [PATCH 2/2] FIX: add missing semicolon --- src/Wizard/ShopWizard/Services/DefaultSettingsService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Wizard/ShopWizard/Services/DefaultSettingsService.php b/src/Wizard/ShopWizard/Services/DefaultSettingsService.php index dfbbda675b..f86680a43e 100644 --- a/src/Wizard/ShopWizard/Services/DefaultSettingsService.php +++ b/src/Wizard/ShopWizard/Services/DefaultSettingsService.php @@ -135,7 +135,7 @@ public function hasInactivePaymentMethod(): bool */ public function getPluginPaymentMethodsRegistered():array { - $paymentMethods = $this->paymentRepository->allPluginPaymentMethods() + $paymentMethods = $this->paymentRepository->allPluginPaymentMethods(); $paymentMethodIds = []; foreach ($paymentMethods as $paymentMethod) {