Fix phpcs

This commit is contained in:
Emili Castells Guasch 2023-09-21 11:59:40 +02:00
parent 09ac019bd0
commit b53b30feab
2 changed files with 26 additions and 26 deletions

View file

@ -15,8 +15,8 @@ use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
return array( return array(
'wcgateway.settings.fields' => function ( ContainerInterface $container, array $fields ): array { 'wcgateway.settings.fields' => function ( ContainerInterface $container, array $fields ): array {
$subscription_helper = $container->get('subscription.helper'); $subscription_helper = $container->get( 'subscription.helper' );
assert($subscription_helper instanceof SubscriptionHelper); assert( $subscription_helper instanceof SubscriptionHelper );
$insert_after = function( array $array, string $key, array $new ): array { $insert_after = function( array $array, string $key, array $new ): array {
$keys = array_keys( $array ); $keys = array_keys( $array );
@ -52,5 +52,5 @@ return array(
), ),
) )
); );
} },
); );

View file

@ -441,7 +441,7 @@ return array(
assert( $subscription_helper instanceof SubscriptionHelper ); assert( $subscription_helper instanceof SubscriptionHelper );
$fields = array( $fields = array(
'checkout_settings_heading' => array( 'checkout_settings_heading' => array(
'heading' => __( 'Standard Payments Settings', 'woocommerce-paypal-payments' ), 'heading' => __( 'Standard Payments Settings', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading', 'type' => 'ppcp-heading',
'screens' => array( 'screens' => array(
@ -451,7 +451,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'title' => array( 'title' => array(
'title' => __( 'Title', 'woocommerce-paypal-payments' ), 'title' => __( 'Title', 'woocommerce-paypal-payments' ),
'type' => 'text', 'type' => 'text',
'description' => __( 'description' => __(
@ -467,7 +467,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'dcc_enabled' => array( 'dcc_enabled' => array(
'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ), 'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ),
'desc_tip' => true, 'desc_tip' => true,
'description' => __( 'Once enabled, the Credit Card option will show up in the checkout.', 'woocommerce-paypal-payments' ), 'description' => __( 'Once enabled, the Credit Card option will show up in the checkout.', 'woocommerce-paypal-payments' ),
@ -482,7 +482,7 @@ return array(
State::STATE_ONBOARDED, State::STATE_ONBOARDED,
), ),
), ),
'dcc_gateway_title' => array( 'dcc_gateway_title' => array(
'title' => __( 'Title', 'woocommerce-paypal-payments' ), 'title' => __( 'Title', 'woocommerce-paypal-payments' ),
'type' => 'text', 'type' => 'text',
'description' => __( 'description' => __(
@ -499,7 +499,7 @@ return array(
), ),
'gateway' => 'dcc', 'gateway' => 'dcc',
), ),
'description' => array( 'description' => array(
'title' => __( 'Description', 'woocommerce-paypal-payments' ), 'title' => __( 'Description', 'woocommerce-paypal-payments' ),
'type' => 'text', 'type' => 'text',
'desc_tip' => true, 'desc_tip' => true,
@ -518,7 +518,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'intent' => array( 'intent' => array(
'title' => __( 'Intent', 'woocommerce-paypal-payments' ), 'title' => __( 'Intent', 'woocommerce-paypal-payments' ),
'type' => 'select', 'type' => 'select',
'class' => array(), 'class' => array(),
@ -540,7 +540,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'capture_on_status_change' => array( 'capture_on_status_change' => array(
'title' => __( 'Capture On Status Change', 'woocommerce-paypal-payments' ), 'title' => __( 'Capture On Status Change', 'woocommerce-paypal-payments' ),
'type' => 'checkbox', 'type' => 'checkbox',
'default' => false, 'default' => false,
@ -557,7 +557,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'capture_for_virtual_only' => array( 'capture_for_virtual_only' => array(
'title' => __( 'Capture Virtual-Only Orders ', 'woocommerce-paypal-payments' ), 'title' => __( 'Capture Virtual-Only Orders ', 'woocommerce-paypal-payments' ),
'type' => 'checkbox', 'type' => 'checkbox',
'default' => false, 'default' => false,
@ -574,7 +574,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'payee_preferred' => array( 'payee_preferred' => array(
'title' => __( 'Instant Payments ', 'woocommerce-paypal-payments' ), 'title' => __( 'Instant Payments ', 'woocommerce-paypal-payments' ),
'type' => 'checkbox', 'type' => 'checkbox',
'default' => false, 'default' => false,
@ -591,7 +591,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'brand_name' => array( 'brand_name' => array(
'title' => __( 'Brand Name', 'woocommerce-paypal-payments' ), 'title' => __( 'Brand Name', 'woocommerce-paypal-payments' ),
'type' => 'text', 'type' => 'text',
'default' => get_bloginfo( 'name' ), 'default' => get_bloginfo( 'name' ),
@ -607,7 +607,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'landing_page' => array( 'landing_page' => array(
'title' => __( 'Landing Page', 'woocommerce-paypal-payments' ), 'title' => __( 'Landing Page', 'woocommerce-paypal-payments' ),
'type' => 'select', 'type' => 'select',
'class' => array(), 'class' => array(),
@ -629,7 +629,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'alternative_payment_methods' => array( 'alternative_payment_methods' => array(
'heading' => __( 'Alternative Payment Methods', 'woocommerce-paypal-payments' ), 'heading' => __( 'Alternative Payment Methods', 'woocommerce-paypal-payments' ),
'description' => sprintf( 'description' => sprintf(
// translators: %1$s, %2$s, %3$s and %4$s are a link tags. // translators: %1$s, %2$s, %3$s and %4$s are a link tags.
@ -645,7 +645,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'disable_funding' => array( 'disable_funding' => array(
'title' => __( 'Disable Alternative Payment Methods', 'woocommerce-paypal-payments' ), 'title' => __( 'Disable Alternative Payment Methods', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-multiselect', 'type' => 'ppcp-multiselect',
'class' => array(), 'class' => array(),
@ -669,7 +669,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'card_billing_data_mode' => array( 'card_billing_data_mode' => array(
'title' => __( 'Send checkout billing data to card fields', 'woocommerce-paypal-payments' ), 'title' => __( 'Send checkout billing data to card fields', 'woocommerce-paypal-payments' ),
'type' => 'select', 'type' => 'select',
'class' => array(), 'class' => array(),
@ -689,7 +689,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => array( 'paypal', CardButtonGateway::ID ), 'gateway' => array( 'paypal', CardButtonGateway::ID ),
), ),
'allow_card_button_gateway' => array( 'allow_card_button_gateway' => array(
'title' => __( 'Create gateway for Standard Card Button', 'woocommerce-paypal-payments' ), 'title' => __( 'Create gateway for Standard Card Button', 'woocommerce-paypal-payments' ),
'type' => 'checkbox', 'type' => 'checkbox',
'desc_tip' => true, 'desc_tip' => true,
@ -703,7 +703,7 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'disable_cards' => array( 'disable_cards' => array(
'title' => __( 'Disable specific credit cards', 'woocommerce-paypal-payments' ), 'title' => __( 'Disable specific credit cards', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-multiselect', 'type' => 'ppcp-multiselect',
'class' => array(), 'class' => array(),
@ -731,7 +731,7 @@ return array(
), ),
'gateway' => 'dcc', 'gateway' => 'dcc',
), ),
'card_icons' => array( 'card_icons' => array(
'title' => __( 'Show logo of the following credit cards', 'woocommerce-paypal-payments' ), 'title' => __( 'Show logo of the following credit cards', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-multiselect', 'type' => 'ppcp-multiselect',
'class' => array(), 'class' => array(),
@ -761,7 +761,7 @@ return array(
), ),
'gateway' => 'dcc', 'gateway' => 'dcc',
), ),
'vault_enabled_dcc' => array( 'vault_enabled_dcc' => array(
'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ), 'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ),
'type' => 'checkbox', 'type' => 'checkbox',
'desc_tip' => true, 'desc_tip' => true,
@ -780,7 +780,7 @@ return array(
'gateway' => 'dcc', 'gateway' => 'dcc',
'input_class' => $container->get( 'wcgateway.helper.vaulting-scope' ) ? array() : array( 'ppcp-disabled-checkbox' ), 'input_class' => $container->get( 'wcgateway.helper.vaulting-scope' ) ? array() : array( 'ppcp-disabled-checkbox' ),
), ),
'3d_secure_heading' => array( '3d_secure_heading' => array(
'heading' => __( '3D Secure', 'woocommerce-paypal-payments' ), 'heading' => __( '3D Secure', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading', 'type' => 'ppcp-heading',
'description' => wp_kses_post( 'description' => wp_kses_post(
@ -808,7 +808,7 @@ return array(
), ),
'gateway' => 'dcc', 'gateway' => 'dcc',
), ),
'3d_secure_contingency' => array( '3d_secure_contingency' => array(
'title' => __( 'Contingency for 3D Secure', 'woocommerce-paypal-payments' ), 'title' => __( 'Contingency for 3D Secure', 'woocommerce-paypal-payments' ),
'type' => 'select', 'type' => 'select',
'description' => sprintf( 'description' => sprintf(
@ -836,7 +836,7 @@ return array(
), ),
'gateway' => 'dcc', 'gateway' => 'dcc',
), ),
'paypal_saved_payments' => array( 'paypal_saved_payments' => array(
'heading' => __( 'Saved payments', 'woocommerce-paypal-payments' ), 'heading' => __( 'Saved payments', 'woocommerce-paypal-payments' ),
'description' => sprintf( 'description' => sprintf(
// translators: %1$s, %2$s, %3$s and %4$s are a link tags. // translators: %1$s, %2$s, %3$s and %4$s are a link tags.
@ -854,8 +854,8 @@ return array(
'requirements' => array(), 'requirements' => array(),
'gateway' => 'paypal', 'gateway' => 'paypal',
), ),
'subscriptions_mode' => $container->get( 'wcgateway.settings.fields.subscriptions_mode' ), 'subscriptions_mode' => $container->get( 'wcgateway.settings.fields.subscriptions_mode' ),
'vault_enabled' => array( 'vault_enabled' => array(
'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ), 'title' => __( 'Vaulting', 'woocommerce-paypal-payments' ),
'type' => 'checkbox', 'type' => 'checkbox',
'desc_tip' => true, 'desc_tip' => true,