From c9b15c0f7697e6ccebd036d7242d1f01a6d32725 Mon Sep 17 00:00:00 2001 From: Narek Zakarian Date: Wed, 2 Nov 2022 19:28:16 +0400 Subject: [PATCH] Fix the phpcs --- .../pay-later-tab-settings.php | 6 ++-- modules/ppcp-wc-gateway/services.php | 36 +++++++++---------- .../src/Helper/SettingsStatus.php | 4 +-- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/ppcp-wc-gateway/pay-later-tab-settings.php b/modules/ppcp-wc-gateway/pay-later-tab-settings.php index c40152ca6..28a4e62f6 100644 --- a/modules/ppcp-wc-gateway/pay-later-tab-settings.php +++ b/modules/ppcp-wc-gateway/pay-later-tab-settings.php @@ -232,7 +232,7 @@ return function ( ContainerInterface $container, array $fields ): array { 'gateway' => Settings::PAY_LATER_TAB_ID, ), - // Single product + // Single product. 'pay_later_product_messaging_heading' => array( 'heading' => __( 'Pay Later Messaging on Single Product', 'woocommerce-paypal-payments' ), 'type' => 'ppcp-heading', @@ -356,7 +356,7 @@ return function ( ContainerInterface $container, array $fields ): array { 'gateway' => Settings::PAY_LATER_TAB_ID, ), - // Cart + // Cart. 'pay_later_cart_messaging_heading' => array( 'heading' => __( 'Pay Later Messaging on Cart', 'woocommerce-paypal-payments' ), 'type' => 'ppcp-heading', @@ -480,7 +480,7 @@ return function ( ContainerInterface $container, array $fields ): array { 'gateway' => Settings::PAY_LATER_TAB_ID, ), - // Checkout + // Checkout. 'pay_later_checkout_messaging_heading' => array( 'heading' => __( 'Pay Later Messaging on Checkout', 'woocommerce-paypal-payments' ), 'type' => 'ppcp-heading', diff --git a/modules/ppcp-wc-gateway/services.php b/modules/ppcp-wc-gateway/services.php index 8698077ae..23c178dd7 100644 --- a/modules/ppcp-wc-gateway/services.php +++ b/modules/ppcp-wc-gateway/services.php @@ -988,15 +988,15 @@ return array( 'requirements' => array(), 'gateway' => 'paypal', ), - 'button_product_preview' => array( - 'type' => 'ppcp-text', - 'text' => $render_preview_element( 'ppcpProductButtonPreview' ), - 'screens' => array( - State::STATE_ONBOARDED, - ), - 'requirements' => array(), - 'gateway' => 'paypal', - ), + 'button_product_preview' => array( + 'type' => 'ppcp-text', + 'text' => $render_preview_element( 'ppcpProductButtonPreview' ), + 'screens' => array( + State::STATE_ONBOARDED, + ), + 'requirements' => array(), + 'gateway' => 'paypal', + ), // Cart settings. 'button_cart_heading' => array( @@ -1139,15 +1139,15 @@ return array( 'requirements' => array(), 'gateway' => 'paypal', ), - 'button_cart_preview' => array( - 'type' => 'ppcp-text', - 'text' => $render_preview_element( 'ppcpCartButtonPreview' ), - 'screens' => array( - State::STATE_ONBOARDED, - ), - 'requirements' => array(), - 'gateway' => 'paypal', - ), + 'button_cart_preview' => array( + 'type' => 'ppcp-text', + 'text' => $render_preview_element( 'ppcpCartButtonPreview' ), + 'screens' => array( + State::STATE_ONBOARDED, + ), + 'requirements' => array(), + 'gateway' => 'paypal', + ), // Mini cart settings. 'button_mini-cart_heading' => array( diff --git a/modules/ppcp-wc-gateway/src/Helper/SettingsStatus.php b/modules/ppcp-wc-gateway/src/Helper/SettingsStatus.php index 8cbc411a9..52a3f4130 100644 --- a/modules/ppcp-wc-gateway/src/Helper/SettingsStatus.php +++ b/modules/ppcp-wc-gateway/src/Helper/SettingsStatus.php @@ -74,8 +74,8 @@ class SettingsStatus { * @throws NotFoundException When a setting was not found. */ public function is_pay_later_button_enabled(): bool { - $pay_later_button_enabled = $this->settings->has( 'pay_later_button_enabled' ) && $this->settings->get( 'pay_later_button_enabled' ); - $selected_locations = $this->settings->has( 'pay_later_button_locations' ) ? $this->settings->get( 'pay_later_button_locations' ) : array(); + $pay_later_button_enabled = $this->settings->has( 'pay_later_button_enabled' ) && $this->settings->get( 'pay_later_button_enabled' ); + $selected_locations = $this->settings->has( 'pay_later_button_locations' ) ? $this->settings->get( 'pay_later_button_locations' ) : array(); return $pay_later_button_enabled && ! empty( $selected_locations ); }