mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix PHPCS and Psalm errors
This commit is contained in:
parent
436fd77587
commit
5aa00d8914
3 changed files with 26 additions and 19 deletions
|
@ -231,6 +231,13 @@ class ApplepayModule implements ModuleInterface {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues the editor assets.
|
||||
*
|
||||
* @param ContainerInterface $c The container.
|
||||
* @param ApplePayButton $button The button.
|
||||
* @return void
|
||||
*/
|
||||
public function load_block_editor_assets( ContainerInterface $c, ApplePayButton $button ): void {
|
||||
// Enqueue backend scripts.
|
||||
add_action(
|
||||
|
|
|
@ -468,9 +468,9 @@ class ApplePayButton implements ButtonInterface {
|
|||
return false;
|
||||
}
|
||||
return wp_verify_nonce(
|
||||
$nonce,
|
||||
'woocommerce-process_checkout'
|
||||
) === 1;
|
||||
$nonce,
|
||||
'woocommerce-process_checkout'
|
||||
) === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -559,11 +559,11 @@ class ApplePayButton implements ButtonInterface {
|
|||
list(
|
||||
$shipping_methods_array, $selected_shipping_method
|
||||
) = $this->cart_shipping_methods(
|
||||
$cart,
|
||||
$customer_address,
|
||||
$shipping_method,
|
||||
$shipping_method_id
|
||||
);
|
||||
$cart,
|
||||
$customer_address,
|
||||
$shipping_method,
|
||||
$shipping_method_id
|
||||
);
|
||||
}
|
||||
$cart->calculate_shipping();
|
||||
$cart->calculate_fees();
|
||||
|
@ -717,7 +717,7 @@ class ApplePayButton implements ButtonInterface {
|
|||
*/
|
||||
protected function calculate_totals_cart_page(
|
||||
array $customer_address,
|
||||
$shipping_method = null
|
||||
$shipping_method = null
|
||||
): array {
|
||||
|
||||
$results = array();
|
||||
|
@ -742,11 +742,11 @@ class ApplePayButton implements ButtonInterface {
|
|||
list(
|
||||
$shipping_methods_array, $selected_shipping_method
|
||||
) = $this->cart_shipping_methods(
|
||||
$cart,
|
||||
$customer_address,
|
||||
$shipping_method,
|
||||
$shipping_method_id
|
||||
);
|
||||
$cart,
|
||||
$customer_address,
|
||||
$shipping_method,
|
||||
$shipping_method_id
|
||||
);
|
||||
}
|
||||
$cart->calculate_shipping();
|
||||
$cart->calculate_fees();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue