mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Fix psalm
This commit is contained in:
parent
15b28f7c85
commit
2654fac15f
3 changed files with 6 additions and 6 deletions
|
@ -3,8 +3,8 @@ type: php
|
||||||
docroot: .ddev/wordpress
|
docroot: .ddev/wordpress
|
||||||
php_version: "7.1"
|
php_version: "7.1"
|
||||||
webserver_type: apache-fpm
|
webserver_type: apache-fpm
|
||||||
router_http_port: "80"
|
router_http_port: "8080"
|
||||||
router_https_port: "443"
|
router_https_port: "8443"
|
||||||
xdebug_enabled: false
|
xdebug_enabled: false
|
||||||
additional_hostnames: ['wc-pp']
|
additional_hostnames: ['wc-pp']
|
||||||
additional_fqdns: []
|
additional_fqdns: []
|
||||||
|
|
|
@ -18,7 +18,7 @@ use WP_REST_Response;
|
||||||
*/
|
*/
|
||||||
class CheckoutPaymentApprovalReversed implements RequestHandler {
|
class CheckoutPaymentApprovalReversed implements RequestHandler {
|
||||||
|
|
||||||
use RequestHandlerTrait;
|
use RequestHandlerTrait, PrefixTrait;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The logger.
|
* The logger.
|
||||||
|
|
|
@ -29,7 +29,7 @@ trait RequestHandlerTrait {
|
||||||
return isset( $purchase_unit['custom_id'] ) ?
|
return isset( $purchase_unit['custom_id'] ) ?
|
||||||
(string) $purchase_unit['custom_id'] : '';
|
(string) $purchase_unit['custom_id'] : '';
|
||||||
},
|
},
|
||||||
isset( $request['resource'] ) && isset( $request['resource']['purchase_units'] ) ?
|
$request['resource'] !== null && isset( $request['resource']['purchase_units'] ) ?
|
||||||
(array) $request['resource']['purchase_units'] : array()
|
(array) $request['resource']['purchase_units'] : array()
|
||||||
),
|
),
|
||||||
static function ( string $order_id ): bool {
|
static function ( string $order_id ): bool {
|
||||||
|
@ -71,7 +71,7 @@ trait RequestHandlerTrait {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
// translators: %s is the PayPal webhook Id.
|
// translators: %s is the PayPal webhook Id.
|
||||||
__( 'No order for webhook event %s was found.', 'woocommerce-paypal-payments' ),
|
__( 'No order for webhook event %s was found.', 'woocommerce-paypal-payments' ),
|
||||||
isset( $request['id'] ) ? $request['id'] : ''
|
$request['id'] !== null && isset( $request['id'] ) ? $request['id'] : ''
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->log_and_return_response( $message, $response );
|
return $this->log_and_return_response( $message, $response );
|
||||||
|
@ -88,7 +88,7 @@ trait RequestHandlerTrait {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
// translators: %s is the PayPal order Id.
|
// translators: %s is the PayPal order Id.
|
||||||
__( 'WC order for PayPal order %s not found.', 'woocommerce-paypal-payments' ),
|
__( 'WC order for PayPal order %s not found.', 'woocommerce-paypal-payments' ),
|
||||||
isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
|
$request['resource'] !== null && isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->log_and_return_response( $message, $response );
|
return $this->log_and_return_response( $message, $response );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue