From 5b5256370a0b445a07d187e77bd6f270a84304db Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Tue, 19 Jun 2018 10:44:45 -0300 Subject: [PATCH] Ignore a single PHPCS rule instead of ignoring all rules Replace the usage of `// @codingStandardsIgnoreStart` and `// @codingStandardsIgnoreEnd` with `// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores` on WC_Gateway_Paypal_IPN_Handler::check_response(). Ignoring a single PHPCS rule is better than ignoring everything to protect the line against potential violations of the other rules. --- .../paypal/includes/class-wc-gateway-paypal-ipn-handler.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php index 151404d6838..4b1ebc5e4ae 100644 --- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php +++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php @@ -45,9 +45,8 @@ class WC_Gateway_Paypal_IPN_Handler extends WC_Gateway_Paypal_Response { if ( ! empty( $_POST ) && $this->validate_ipn() ) { // WPCS: CSRF ok. $posted = wp_unslash( $_POST ); // WPCS: CSRF ok, input var ok. - // @codingStandardsIgnoreStart + // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores do_action( 'valid-paypal-standard-ipn-request', $posted ); - // @codingStandardsIgnoreEnd exit; }