From d39914597dac10996155e5269ee143b2ffafc542 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 30 May 2024 11:30:58 +0200 Subject: [PATCH 1/5] Check if card variable exist --- .../src/components/buckaroo-payment-list/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resources/app/administration/src/components/buckaroo-payment-list/index.js b/src/Resources/app/administration/src/components/buckaroo-payment-list/index.js index 201cef42..f6ee7d6b 100644 --- a/src/Resources/app/administration/src/components/buckaroo-payment-list/index.js +++ b/src/Resources/app/administration/src/components/buckaroo-payment-list/index.js @@ -146,7 +146,7 @@ Component.register("buckaroo-payment-list", { methods: { getPaymentTitle(code) { const card = this.configSettings.filter((card) => card.name === code)?.pop(); - if (card.title) { + if (card && card.title) { return this.getInlineSnippet(card.title); } return code From 8752f9e0eb02925c6e9092ac4d809e525a2bbacd Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 30 May 2024 12:36:28 +0200 Subject: [PATCH 2/5] New line --- src/Handlers/AsyncPaymentHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Handlers/AsyncPaymentHandler.php b/src/Handlers/AsyncPaymentHandler.php index 9d7b7119..265640cc 100644 --- a/src/Handlers/AsyncPaymentHandler.php +++ b/src/Handlers/AsyncPaymentHandler.php @@ -551,7 +551,8 @@ private function setFeeOnOrder( * * @return boolean */ - protected function isAfterpayOld(string $salesChannelContextId) { + protected function isAfterpayOld(string $salesChannelContextId) + { return $this->getSetting('afterpayEnabledold', $salesChannelContextId) === true; } } From c37ca0f5982d82bbdc1bae0ae54f2ea4be9232a9 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 30 May 2024 12:38:22 +0200 Subject: [PATCH 3/5] remove white space end of line --- src/Handlers/AsyncPaymentHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handlers/AsyncPaymentHandler.php b/src/Handlers/AsyncPaymentHandler.php index 265640cc..0c6aeae7 100644 --- a/src/Handlers/AsyncPaymentHandler.php +++ b/src/Handlers/AsyncPaymentHandler.php @@ -551,7 +551,7 @@ private function setFeeOnOrder( * * @return boolean */ - protected function isAfterpayOld(string $salesChannelContextId) + protected function isAfterpayOld(string $salesChannelContextId) { return $this->getSetting('afterpayEnabledold', $salesChannelContextId) === true; } From 6e9a80ed9bb900f73ab7ce62c91ce0e0ae42c473 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 30 May 2024 13:44:10 +0200 Subject: [PATCH 4/5] Ignore error for now --- phpstan.neon | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 3b1859bd..133ab096 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,4 +4,6 @@ parameters: - ./src checkMissingIterableValueType: false treatPhpDocTypesAsCertain: false - checkGenericClassInNonGenericObjectType: false \ No newline at end of file + checkGenericClassInNonGenericObjectType: false + ignoreErrors: + - '#Call to an undefined method [a-zA-Z0-9\\_]+::setServiceVersion\(\)#' \ No newline at end of file From 39451358c1a535823d464afdc31e00d432e2f054 Mon Sep 17 00:00:00 2001 From: Shu Chen Date: Thu, 30 May 2024 13:45:59 +0200 Subject: [PATCH 5/5] tab fix --- phpstan.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 133ab096..4446fc51 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -6,4 +6,4 @@ parameters: treatPhpDocTypesAsCertain: false checkGenericClassInNonGenericObjectType: false ignoreErrors: - - '#Call to an undefined method [a-zA-Z0-9\\_]+::setServiceVersion\(\)#' \ No newline at end of file + - '#Call to an undefined method [a-zA-Z0-9\\_]+::setServiceVersion\(\)#' \ No newline at end of file