PHPCS fixes.

This commit is contained in:
Peter Fabian 2019-12-05 15:30:53 +01:00
parent 9b398947dd
commit 85c4a5beed
2 changed files with 9 additions and 8 deletions

View File

@ -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.

View File

@ -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 ) {