diff --git a/class-two-factor-core.php b/class-two-factor-core.php index 82b42d96..51c3cee3 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -1161,6 +1161,7 @@ public static function current_user_can_update_two_factor_options( $context = 'd * Return a falsey value (false, 0) if you wish to never require revalidation. * * @param int $two_factor_revalidate_time The grace time between last validation time and when it'll be accepted. Default 10 minutes (in seconds). + * @param int $user_id The user ID. * @param string $context The context in use, 'display' or 'save'. Save has twice the grace time. */ $two_factor_revalidate_time = apply_filters( 'two_factor_revalidate_time', 10 * MINUTE_IN_SECONDS, $user_id, $context ); diff --git a/providers/class-two-factor-backup-codes.php b/providers/class-two-factor-backup-codes.php index c53a8448..6b017de4 100644 --- a/providers/class-two-factor-backup-codes.php +++ b/providers/class-two-factor-backup-codes.php @@ -40,7 +40,7 @@ protected function __construct() { add_action( 'two_factor_user_options_' . __CLASS__, array( $this, 'user_options' ) ); add_action( 'admin_notices', array( $this, 'admin_notices' ) ); - return parent::__construct(); + parent::__construct(); } /** diff --git a/providers/class-two-factor-dummy.php b/providers/class-two-factor-dummy.php index 34c6b57d..cc9a6119 100644 --- a/providers/class-two-factor-dummy.php +++ b/providers/class-two-factor-dummy.php @@ -21,7 +21,7 @@ class Two_Factor_Dummy extends Two_Factor_Provider { */ protected function __construct() { add_action( 'two_factor_user_options_' . __CLASS__, array( $this, 'user_options' ) ); - return parent::__construct(); + parent::__construct(); } /** diff --git a/providers/class-two-factor-email.php b/providers/class-two-factor-email.php index ac3955ce..0ab3bc18 100644 --- a/providers/class-two-factor-email.php +++ b/providers/class-two-factor-email.php @@ -42,7 +42,7 @@ class Two_Factor_Email extends Two_Factor_Provider { */ protected function __construct() { add_action( 'two_factor_user_options_' . __CLASS__, array( $this, 'user_options' ) ); - return parent::__construct(); + parent::__construct(); } /** diff --git a/providers/class-two-factor-fido-u2f-admin.php b/providers/class-two-factor-fido-u2f-admin.php index 23530370..d5412089 100644 --- a/providers/class-two-factor-fido-u2f-admin.php +++ b/providers/class-two-factor-fido-u2f-admin.php @@ -230,7 +230,7 @@ public static function show_user_profile( $user ) { * @static * * @param int $user_id User ID. - * @return false + * @return void|never */ public static function catch_submission( $user_id ) { if ( ! empty( $_REQUEST['do_new_security_key'] ) ) { @@ -243,7 +243,7 @@ public static function catch_submission( $user_id ) { Two_Factor_FIDO_U2F::add_security_key( $user_id, $reg ); } catch ( Exception $e ) { - return false; + return; } delete_user_meta( $user_id, self::REGISTER_DATA_USER_META_KEY ); diff --git a/providers/class-two-factor-fido-u2f.php b/providers/class-two-factor-fido-u2f.php index 52d28f57..c90cf6b3 100644 --- a/providers/class-two-factor-fido-u2f.php +++ b/providers/class-two-factor-fido-u2f.php @@ -65,7 +65,7 @@ protected function __construct() { add_action( 'two_factor_user_options_' . __CLASS__, array( $this, 'user_options' ) ); - return parent::__construct(); + parent::__construct(); } /** @@ -143,7 +143,7 @@ public static function enqueue_scripts() { * @since 0.1-dev * * @param WP_User $user WP_User object of the logged-in user. - * @return null + * @return void */ public function authentication_page( $user ) { require_once ABSPATH . '/wp-admin/includes/template.php'; @@ -165,7 +165,7 @@ public function authentication_page( $user ) { ?>
ID ) ) { - return false; + return; } $key = $this->get_user_totp_key( $user->ID );