From 85c4a5beeddb0370f063c8736b0f0c6519811425 Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Thu, 5 Dec 2019 15:30:53 +0100 Subject: [PATCH] PHPCS fixes. --- includes/class-wc-form-handler.php | 9 +++++---- includes/class-wc-rate-limiter.php | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index 566d74c764a..7724432aadc 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -464,14 +464,15 @@ class WC_Form_Handler { _n( 'You cannot add a new payment method so soon after the previous one. Please wait for %d second.', 'You cannot add a new payment method so soon after the previous one. Please wait for %d seconds.', - $delay, - 'woocommerce' ), + $delay, + 'woocommerce' + ), 'error' ); return; } - - WC_Rate_Limiter::set_rate_limit( $rate_limit_id, $delay); + + WC_Rate_Limiter::set_rate_limit( $rate_limit_id, $delay ); $nonce_value = wc_get_var( $_REQUEST['woocommerce-add-payment-method-nonce'], wc_get_var( $_REQUEST['_wpnonce'], '' ) ); // @codingStandardsIgnoreLine. diff --git a/includes/class-wc-rate-limiter.php b/includes/class-wc-rate-limiter.php index 5a582160125..64e89025ba9 100644 --- a/includes/class-wc-rate-limiter.php +++ b/includes/class-wc-rate-limiter.php @@ -34,7 +34,7 @@ class WC_Rate_Limiter { /** * Constructs Option name from action identifier. * - * @param $id + * @param string $id * @return string */ public static function storage_id( $id ) { @@ -44,7 +44,7 @@ class WC_Rate_Limiter { /** * Returns true if the action is not allowed to be run by the rate limiter yet, false otherwise. * - * @param $id Identifier for the action + * @param string $id Identifier for the action * @return bool */ public static function retried_too_soon( $id ) { @@ -67,8 +67,8 @@ class WC_Rate_Limiter { /** * Sets the rate limit delay in seconds for action with identifier $id. * - * @param $id Identifier for the action. - * @param $delay Delay in seconds. + * @param string $id Identifier for the action. + * @param int $delay Delay in seconds. * @return bool True if the option setting was successful, false otherwise. */ public static function set_rate_limit( $id, $delay ) {