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.
This commit is contained in:
Rodrigo Primo 2018-06-19 10:44:45 -03:00
parent e0ccc64571
commit 5b5256370a
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}