From 6c1a89850c977f477967f7de8cced4250ba0fccf Mon Sep 17 00:00:00 2001 From: Josh Cunningham Date: Wed, 24 Oct 2018 16:06:52 -0700 Subject: [PATCH] Change deprecation error handling; adjust deprecation docblocks --- WP_Auth0.php | 8 +- lib/WP_Auth0_Api_Client.php | 28 +++---- lib/WP_Auth0_Api_Operations.php | 4 +- lib/WP_Auth0_Configure_JWTAUTH.php | 5 +- lib/WP_Auth0_EditProfile.php | 16 ++-- lib/WP_Auth0_Email_Verification.php | 2 +- lib/WP_Auth0_ErrorLog.php | 4 +- lib/WP_Auth0_Export_Users.php | 5 +- lib/WP_Auth0_Lock10_Options.php | 84 +++++++++++-------- lib/WP_Auth0_Lock_Options.php | 8 +- lib/WP_Auth0_LoginManager.php | 14 ++-- lib/WP_Auth0_Metrics.php | 2 +- lib/WP_Auth0_Options.php | 10 ++- lib/WP_Auth0_Referer_Check.php | 2 +- lib/WP_Auth0_Users.php | 2 +- lib/WP_Auth0_UsersRepo.php | 2 +- lib/admin/WP_Auth0_Admin.php | 5 +- lib/admin/WP_Auth0_Admin_Advanced.php | 29 ++++--- lib/admin/WP_Auth0_Admin_Appearance.php | 8 +- lib/admin/WP_Auth0_Admin_Basic.php | 18 ++-- lib/admin/WP_Auth0_Admin_Dashboard.php | 8 +- lib/admin/WP_Auth0_Admin_Features.php | 8 +- lib/admin/WP_Auth0_Admin_Generic.php | 5 +- .../WP_Auth0_Dashboard_Plugins_Age.php | 8 +- .../WP_Auth0_Dashboard_Plugins_Gender.php | 8 +- .../WP_Auth0_Dashboard_Plugins_Generic.php | 8 +- .../WP_Auth0_Dashboard_Plugins_IdP.php | 10 ++- .../WP_Auth0_Dashboard_Plugins_Income.php | 8 +- .../WP_Auth0_Dashboard_Plugins_Location.php | 8 +- .../WP_Auth0_Dashboard_Plugins_Signups.php | 8 +- .../WP_Auth0_Dashboard_Widgets.php | 8 +- lib/initial-setup/WP_Auth0_InitialSetup.php | 4 +- .../WP_Auth0_InitialSetup_Connections.php | 6 +- .../WP_Auth0_InitialSetup_Migration.php | 2 +- .../WP_Auth0_InitialSetup_Rules.php | 4 +- .../WP_Auth0_InitialSetup_Signup.php | 2 +- 36 files changed, 203 insertions(+), 158 deletions(-) diff --git a/WP_Auth0.php b/WP_Auth0.php index 9ea08482..a0f859f6 100644 --- a/WP_Auth0.php +++ b/WP_Auth0.php @@ -516,7 +516,7 @@ private function autoloader( $class ) { */ public function a0_render_message() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $message = null; @@ -538,7 +538,7 @@ public function a0_render_message() { */ public function check_signup_status() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $app_token = $this->a0_options->get( 'auth0_app_token' ); @@ -572,7 +572,7 @@ public function check_signup_status() { } /** - * @deprecated 3.6.0 - Use WPA0_PLUGIN_URL constant + * @deprecated - 3.6.0, use WPA0_PLUGIN_URL constant * * @return string * @@ -580,7 +580,7 @@ public function check_signup_status() { */ public static function get_plugin_dir_url() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return WPA0_PLUGIN_URL; } } diff --git a/lib/WP_Auth0_Api_Client.php b/lib/WP_Auth0_Api_Client.php index a3ff72fc..ec7c0c35 100755 --- a/lib/WP_Auth0_Api_Client.php +++ b/lib/WP_Auth0_Api_Client.php @@ -857,7 +857,7 @@ public static function get_client_grant_types() { * * @see https://auth0.com/docs/api-auth/intro#other-authentication-api-endpoints * - * @deprecated 3.6.0 + * @deprecated - 3.6.0, not used and no replacement provided. * * @param $domain * @param $client_id @@ -871,10 +871,8 @@ public static function get_client_grant_types() { * @codeCoverageIgnore - Deprecated */ public static function ro( $domain, $client_id, $username, $password, $connection, $scope ) { - - $deprecation_msg = sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ); - trigger_error( $deprecation_msg, E_USER_DEPRECATED ); - WP_Auth0_ErrorManager::insert_auth0_error( __METHOD__, $deprecation_msg ); + // phpcs:ignore + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $endpoint = "https://$domain/"; @@ -926,7 +924,7 @@ public static function ro( $domain, $client_id, $username, $password, $connectio */ public static function validate_user_token( $app_token ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); if ( empty( $app_token ) ) { return false; @@ -961,7 +959,7 @@ public static function validate_user_token( $app_token ) { */ public static function search_users( $domain, $jwt, $q = '', $page = 0, $per_page = 100, $include_totals = false, $sort = 'user_id:1' ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $include_totals = $include_totals ? 'true' : 'false'; @@ -996,7 +994,7 @@ public static function search_users( $domain, $jwt, $q = '', $page = 0, $per_pag */ public static function resend_verification_email( $user_id ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $response = wp_remote_post( self::get_endpoint( 'api/v2/jobs/verification-email' ), @@ -1033,7 +1031,7 @@ public static function resend_verification_email( $user_id ) { */ public static function create_user( $domain, $jwt, $data ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $endpoint = "https://$domain/api/v2/users"; @@ -1072,7 +1070,7 @@ public static function create_user( $domain, $jwt, $data ) { */ public static function search_clients( $domain, $app_token ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $endpoint = "https://$domain/api/v2/clients"; @@ -1113,7 +1111,7 @@ public static function search_clients( $domain, $app_token ) { */ public static function get_current_user( $domain, $app_token ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); list( $head, $payload, $signature ) = explode( '.', $app_token ); $decoded = json_decode( JWT::urlsafeB64Decode( $payload ) ); @@ -1128,7 +1126,7 @@ public static function get_current_user( $domain, $app_token ) { */ public static function delete_connection( $domain, $app_token, $id ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $endpoint = "https://$domain/api/v2/connections/$id"; @@ -1167,7 +1165,7 @@ public static function delete_connection( $domain, $app_token, $id ) { */ public static function delete_user_mfa( $domain, $app_token, $user_id, $provider ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $endpoint = "https://$domain/api/v2/users/$user_id/multifactor/$provider"; @@ -1206,7 +1204,7 @@ public static function delete_user_mfa( $domain, $app_token, $user_id, $provider */ public static function change_password( $domain, $payload ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $endpoint = "https://$domain/dbconnections/change_password"; @@ -1249,7 +1247,7 @@ public static function change_password( $domain, $payload ) { */ public static function link_users( $domain, $app_token, $main_user_id, $user_id, $provider, $connection_id = null ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $endpoint = "https://$domain/api/v2/users/$main_user_id/identities"; diff --git a/lib/WP_Auth0_Api_Operations.php b/lib/WP_Auth0_Api_Operations.php index 0da86138..8de91718 100644 --- a/lib/WP_Auth0_Api_Operations.php +++ b/lib/WP_Auth0_Api_Operations.php @@ -166,7 +166,7 @@ public function toggle_rule( $app_token, $rule_id, $rule_name, $rule_script ) { */ public function disable_signup_wordpress_connection( $app_token, $disable_signup ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $domain = $this->a0_options->get( 'domain' ); $client_id = $this->a0_options->get( 'client_id' ); @@ -210,7 +210,7 @@ public function disable_signup_wordpress_connection( $app_token, $disable_signup */ public function social_validation( $app_token, $old_options, $input, $strategy, $connection_options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $domain = $this->a0_options->get( 'domain' ); $client_id = $this->a0_options->get( 'client_id' ); diff --git a/lib/WP_Auth0_Configure_JWTAUTH.php b/lib/WP_Auth0_Configure_JWTAUTH.php index 38d901b8..e478dda6 100755 --- a/lib/WP_Auth0_Configure_JWTAUTH.php +++ b/lib/WP_Auth0_Configure_JWTAUTH.php @@ -35,12 +35,13 @@ public function notify_jwt() { } /** + * @deprecated - 3.6.0, not needed, handled in WP_Auth0_Admin::admin_enqueue() * - * @deprecated 3.6.0 - Not needed, handled in WP_Auth0_Admin::admin_enqueue() + * @codeCoverageIgnore - Deprecated */ public function admin_enqueue() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } public function render_settings_page() { diff --git a/lib/WP_Auth0_EditProfile.php b/lib/WP_Auth0_EditProfile.php index f6db6953..ca88710b 100644 --- a/lib/WP_Auth0_EditProfile.php +++ b/lib/WP_Auth0_EditProfile.php @@ -201,7 +201,7 @@ public function override_email_update() { */ public function validate_new_password( $errors, $update, $user ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $auth0_password = isset( $_POST['auth0_password'] ) ? $_POST['auth0_password'] : null; $auth0_repeat_password = isset( $_POST['auth0_repeat_password'] ) ? $_POST['auth0_repeat_password'] : null; @@ -220,7 +220,7 @@ public function validate_new_password( $errors, $update, $user ) { */ public function update_change_password() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $current_user = get_currentauth0user(); $user_profile = $current_user->auth0_obj; @@ -283,7 +283,7 @@ public function update_change_password() { */ public function delete_user_data() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); if ( ! is_admin() ) { return; @@ -303,7 +303,7 @@ public function delete_user_data() { */ public function delete_mfa() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); if ( ! is_admin() ) { return; @@ -334,7 +334,7 @@ public function delete_mfa() { */ public function show_delete_identity() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); if ( ! is_admin() ) { return; @@ -387,7 +387,7 @@ function DeleteAuth0Data(event) { */ public function show_delete_mfa() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); if ( ! is_admin() ) { return; @@ -442,7 +442,7 @@ function DeleteMFA(event) { */ public function show_change_password() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $current_user = get_currentauth0user(); $user_profile = $current_user->auth0_obj; @@ -499,7 +499,7 @@ public function show_change_password() { */ public function disable_email_field() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $current_user = get_currentauth0user(); $user_profile = $current_user->auth0_obj; diff --git a/lib/WP_Auth0_Email_Verification.php b/lib/WP_Auth0_Email_Verification.php index 3276e57a..3d2a5a93 100644 --- a/lib/WP_Auth0_Email_Verification.php +++ b/lib/WP_Auth0_Email_Verification.php @@ -110,7 +110,7 @@ public function resend_verification_email() { */ public static function ajax_resend_email() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); check_ajax_referer( self::RESEND_NONCE_ACTION ); if ( ! empty( $_POST['sub'] ) ) { diff --git a/lib/WP_Auth0_ErrorLog.php b/lib/WP_Auth0_ErrorLog.php index 8efda001..39179ae6 100644 --- a/lib/WP_Auth0_ErrorLog.php +++ b/lib/WP_Auth0_ErrorLog.php @@ -124,13 +124,13 @@ private function update( array $log ) { /** * Enqueue scripts and styles. * - * @deprecated 3.6.0 - Not needed, handled in WP_Auth0_Admin::admin_enqueue() + * @deprecated - 3.6.0, not used, handled in WP_Auth0_Admin::admin_enqueue() * * @codeCoverageIgnore */ public function admin_enqueue() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } } diff --git a/lib/WP_Auth0_Export_Users.php b/lib/WP_Auth0_Export_Users.php index 50b0ae7e..528263e3 100644 --- a/lib/WP_Auth0_Export_Users.php +++ b/lib/WP_Auth0_Export_Users.php @@ -15,12 +15,13 @@ public function init() { } /** + * @deprecated - 3.6.0, not used, handled in WP_Auth0_Admin::admin_enqueue() * - * @deprecated 3.6.0 - Not needed, handled in WP_Auth0_Admin::admin_enqueue() + * @codeCoverageIgnore - Deprecated */ public function admin_enqueue() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } public function a0_add_users_export() { diff --git a/lib/WP_Auth0_Lock10_Options.php b/lib/WP_Auth0_Lock10_Options.php index fdd651d0..e2ddac4b 100644 --- a/lib/WP_Auth0_Lock10_Options.php +++ b/lib/WP_Auth0_Lock10_Options.php @@ -221,14 +221,15 @@ private function get_callback_protocol() { } /** - * - * @deprecated 3.6.0 - Not used, determined in wp-content/plugins/auth0/assets/js/lock-init.js. + * @deprecated - 3.6.0, not used, determined in wp-content/plugins/auth0/assets/js/lock-init.js. * * @return string + * + * @codeCoverageIgnore - Deprecated */ public function get_lock_classname() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); if ( $this->_get_boolean( $this->wp_options->get( 'passwordless_enabled' ) ) ) { return 'Auth0LockPasswordless'; } else { @@ -237,110 +238,119 @@ public function get_lock_classname() { } /** - * - * @deprecated 3.6.0 - Replaced with WP_Auth0_Options::Instance()->get( 'passwordless_enabled' ). + * @deprecated - 3.6.0, replaced with WP_Auth0_Options::Instance()->get( 'passwordless_enabled' ). * * @return bool + * + * @codeCoverageIgnore - Deprecated */ public function isPasswordlessEnable() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return $this->_get_boolean( $this->wp_options->get( 'passwordless_enabled' ) ); } /** - * - * @deprecated 3.6.0 - Not used, invalid way to display Passwordless in Lock 11.2. + * @deprecated - 3.6.0, not used, invalid way to display Passwordless in Lock 11.2. * * @return string + * + * @codeCoverageIgnore - Deprecated */ public function get_lock_show_method() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return 'show'; } /** - * - * @deprecated 3.6.0 - Not used, use WP_Auth0_Options::Instance->get( 'custom_css' ) instead. + * @deprecated - 3.6.0, not used, use WP_Auth0_Options::Instance->get( 'custom_css' ) instead. * * @return string + * + * @codeCoverageIgnore - Deprecated */ public function get_custom_css() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return $this->wp_options->get( 'custom_css' ); } /** - * - * @deprecated 3.6.0 - Not used, use WP_Auth0_Options::Instance->get( 'custom_js' ) instead. + * @deprecated - 3.6.0, not used, use WP_Auth0_Options::Instance->get( 'custom_js' ) instead. * * @return string + * + * @codeCoverageIgnore - Deprecated */ public function get_custom_js() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return $this->wp_options->get( 'custom_js' ); } /** - * - * @deprecated 3.6.0 - Not used, call WP_Auth0::ready() instead. + * @deprecated - 3.6.0, not used, call WP_Auth0::ready() instead. * * @return string + * + * @codeCoverageIgnore - Deprecated */ public function can_show() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return WP_Auth0::ready(); } /** - * - * @deprecated 3.6.0 - Not used, use WP_Auth0_Options::Instance->get( 'cdn_url' ) instead. + * @deprecated - 3.6.0, not used, use WP_Auth0_Options::Instance->get( 'cdn_url' ) instead. * * @return string + * + * @codeCoverageIgnore - Deprecated */ public function get_cdn_url() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return $this->wp_options->get( 'cdn_url' ); } /** - * - * @deprecated 3.6.0 - Not used, use (bool) WP_Auth0_Options::Instance->get( 'wordpress_login_enabled' ) instead. + * @deprecated - 3.6.0, not used, use (bool) WP_Auth0_Options::Instance->get( 'wordpress_login_enabled' ) instead. * * @return string + * + * @codeCoverageIgnore - Deprecated */ public function get_wordpress_login_enabled() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return $this->_get_boolean( $this->wp_options->get( 'wordpress_login_enabled' ) ); } /** - * - * @deprecated 3.6.0 - Not used, $this->signup_mode is never changed. + * @deprecated - 3.6.0, not used, $this->signup_mode is never changed. * * @param bool $enabled - disallow logins? + * + * @codeCoverageIgnore - Deprecated */ public function set_signup_mode( $enabled ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $this->signup_mode = $enabled; } /** - * - * @deprecated 3.6.0 - Not used, value and default are passed to wp_localize_script() in templates/login-form.php. + * @deprecated - 3.6.0, not used, value and default are passed to wp_localize_script() in templates/login-form.php. * * @return mixed|string + * + * @codeCoverageIgnore - Deprecated */ public function modal_button_name() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $name = 'Login'; if ( isset( $this->extended_settings['modal_trigger_name'] ) && $this->extended_settings['modal_trigger_name'] != '' ) { $name = $this->extended_settings['modal_trigger_name']; @@ -349,14 +359,15 @@ public function modal_button_name() { } /** - * - * @deprecated 3.6.0 - Not used, use WP_Auth0_Options::Instance()->get('custom_signup_fields') instead. + * @deprecated - 3.6.0, not used, use WP_Auth0_Options::Instance()->get('custom_signup_fields') instead. * * @return mixed|string + * + * @codeCoverageIgnore - Deprecated */ public function get_custom_signup_fields() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $fields = $this->wp_options->get( 'custom_signup_fields' ); if ( trim( $fields ) === '' ) { @@ -367,14 +378,15 @@ public function get_custom_signup_fields() { } /** - * - * @deprecated 3.6.0 - Not used, use WP_Auth0_Options::Instance()->get('custom_signup_fields') instead. + * @deprecated - 3.6.0, not used, use WP_Auth0_Options::Instance()->get('custom_signup_fields') instead. * * @return mixed|string + * + * @codeCoverageIgnore - Deprecated */ public function has_custom_signup_fields() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return $this->wp_options->get( 'custom_signup_fields' ); } } diff --git a/lib/WP_Auth0_Lock_Options.php b/lib/WP_Auth0_Lock_Options.php index b8ed23c7..c1e3b90f 100644 --- a/lib/WP_Auth0_Lock_Options.php +++ b/lib/WP_Auth0_Lock_Options.php @@ -3,7 +3,9 @@ /** * Class WP_Auth0_Lock_Options. * - * @deprecated 3.6.0 - Outdated, use WP_Auth0_Lock10_Options + * @deprecated - 3.6.0, not used, use WP_Auth0_Lock10_Options instead. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Lock_Options { @@ -15,13 +17,13 @@ class WP_Auth0_Lock_Options { /** * WP_Auth0_Lock_Options constructor. * - * @deprecated 3.6.0 - Outdated, use WP_Auth0_Lock10_Options + * @deprecated - 3.6.0, not used, use WP_Auth0_Lock10_Options instead. * * @param array $extended_settings */ public function __construct( $extended_settings = array() ) { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); $this->wp_options = WP_Auth0_Options::Instance(); $this->extended_settings = $extended_settings; } diff --git a/lib/WP_Auth0_LoginManager.php b/lib/WP_Auth0_LoginManager.php index dc785f41..c1ccc445 100755 --- a/lib/WP_Auth0_LoginManager.php +++ b/lib/WP_Auth0_LoginManager.php @@ -73,7 +73,7 @@ public function __construct( if ( func_num_args() > 2 ) { // phpcs:ignore - trigger_error( + @trigger_error( sprintf( __( '$admin_role and $ignore_unverified_email are deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); @@ -792,7 +792,7 @@ protected function die_on_login( $msg = '', $code = 0, $login_link = true ) { */ public function end_session() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); if ( session_id() ) { session_destroy(); @@ -802,7 +802,7 @@ public function end_session() { /** * Login using oauth/ro endpoint * - * @deprecated 3.6.0 - Use Password Grant instead. + * @deprecated - 3.6.0, not used and no replacement provided. * * @param string $username - Username from the login form. * @param string $password - Password from the login form. @@ -817,7 +817,7 @@ public function end_session() { */ public function login_with_credentials( $username, $password, $connection = 'Username-Password-Authentication' ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $domain = $this->a0_options->get( 'domain' ); $client_id = $this->a0_options->get( 'client_id' ); $secret = $this->a0_options->get_client_secret_as_key(); @@ -853,17 +853,17 @@ public function login_with_credentials( $username, $password, $connection = 'Use /** * Deprecated to improve the functionality and move to a new class * - * @deprecated 3.5.0 + * @deprecated - 3.5.0, use WP_Auth0_Email_Verification::render_die(). * * @param object $userinfo - Auth0 profile. * @param string $id_token - ID token. * - * @see WP_Auth0_Email_Verification::render_die() + * @codeCoverageIgnore - Deprecated */ // phpcs:ignore private function dieWithVerifyEmail( $userinfo, $id_token = '' ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); WP_Auth0_Email_Verification::render_die( $userinfo ); } } diff --git a/lib/WP_Auth0_Metrics.php b/lib/WP_Auth0_Metrics.php index f6529db3..26d890cd 100644 --- a/lib/WP_Auth0_Metrics.php +++ b/lib/WP_Auth0_Metrics.php @@ -13,7 +13,7 @@ class WP_Auth0_Metrics { */ public function __construct( WP_Auth0_Options $a0_options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $this->a0_options = $a0_options; } diff --git a/lib/WP_Auth0_Options.php b/lib/WP_Auth0_Options.php index 7b9f082d..d32111e2 100755 --- a/lib/WP_Auth0_Options.php +++ b/lib/WP_Auth0_Options.php @@ -282,7 +282,7 @@ protected function defaults() { */ public function set_connection( $key, $value ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $options = $this->get_options(); $options['connections'][ $key ] = $value; @@ -297,7 +297,7 @@ public function set_connection( $key, $value ) { */ public function get_connection( $key, $default = null ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $options = $this->get_options(); @@ -308,13 +308,15 @@ public function get_connection( $key, $default = null ) { } /** - * @deprecated 3.6.0 - Social connections are no longer set during initial setup so this data is no longer needed. + * @deprecated - 3.6.0, social connections are no longer set during initial setup so this data is no longer needed. * * @return array + * + * @codeCoverageIgnore - Deprecated */ public function get_enabled_connections() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return array( 'facebook', 'twitter', 'google-oauth2' ); } } diff --git a/lib/WP_Auth0_Referer_Check.php b/lib/WP_Auth0_Referer_Check.php index 90f56032..24641eb3 100644 --- a/lib/WP_Auth0_Referer_Check.php +++ b/lib/WP_Auth0_Referer_Check.php @@ -18,7 +18,7 @@ public static function init() { */ private function __construct() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); add_action( 'init', array( $this, 'do_url_check' ) ); add_filter( 'wp_auth0_get_option', array( $this, 'check_activate' ), 10, 2 ); diff --git a/lib/WP_Auth0_Users.php b/lib/WP_Auth0_Users.php index 7cb3edb8..2e03a953 100644 --- a/lib/WP_Auth0_Users.php +++ b/lib/WP_Auth0_Users.php @@ -86,7 +86,7 @@ public static function create_user( $userinfo, $role = null ) { if ( $role ) { // phpcs:ignore - trigger_error( sprintf( __( '$role parameter is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( '$role parameter is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $user_data['role'] = 'administrator'; } diff --git a/lib/WP_Auth0_UsersRepo.php b/lib/WP_Auth0_UsersRepo.php index fa38d3c9..2e30b286 100644 --- a/lib/WP_Auth0_UsersRepo.php +++ b/lib/WP_Auth0_UsersRepo.php @@ -87,7 +87,7 @@ public function create( $userinfo, $token, $access_token = null, $role = null, $ if ( func_num_args() > 2 ) { // phpcs:ignore - trigger_error( + @trigger_error( sprintf( __( '$access_token, $role, and $skip_email_verified params are deprecated.', 'wp-auth0' ), __METHOD__ diff --git a/lib/admin/WP_Auth0_Admin.php b/lib/admin/WP_Auth0_Admin.php index d77b0416..8cd72836 100755 --- a/lib/admin/WP_Auth0_Admin.php +++ b/lib/admin/WP_Auth0_Admin.php @@ -72,12 +72,13 @@ public function admin_enqueue() { } /** + * @deprecated - 3.6.0, this method displayed an empty auth0_app_token notification, which is not necessary. * - * @deprecated 3.6.0 - This method displayed an empty auth0_app_token notification, which is not necessary. + * @codeCoverageIgnore - Deprecated */ public function cant_connect_to_auth0() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } public function init_admin() { diff --git a/lib/admin/WP_Auth0_Admin_Advanced.php b/lib/admin/WP_Auth0_Admin_Advanced.php index f58fc90e..050cfc55 100644 --- a/lib/admin/WP_Auth0_Admin_Advanced.php +++ b/lib/admin/WP_Auth0_Admin_Advanced.php @@ -3,8 +3,7 @@ class WP_Auth0_Admin_Advanced extends WP_Auth0_Admin_Generic { /** - * - * @deprecated 3.6.0 - Use $this->_description instead + * @deprecated - 3.6.0, use $this->_description instead */ const ADVANCED_DESCRIPTION = ''; @@ -827,55 +826,61 @@ public function loginredirection_validation( $old_options, $input ) { } /** + * @deprecated - 3.6.0, handled by WP_Auth0_Admin_Features::render_passwordless_enabled() * - * @deprecated 3.6.0 - Handled by WP_Auth0_Admin_Features::render_passwordless_enabled() + * @codeCoverageIgnore - Deprecated */ public function render_passwordless_enabled() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } /** + * @deprecated - 3.6.0, passwordless method is determined by activating them for this Application. * - * @deprecated 3.6.0 - Passwordless method is determined by activating them for this Application. + * @codeCoverageIgnore - Deprecated */ public function render_passwordless_method() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } /** + * @deprecated - 3.6.0, this feature was removed so this option is unused. * - * @deprecated 3.6.0 - This feature was removed so this option is unused. + * @codeCoverageIgnore - Deprecated */ public function render_metrics() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } /** + * @deprecated - 3.6.0, handled by WP_Auth0_Admin_Generic::render_description(). * - * @deprecated 3.6.0 - Handled by WP_Auth0_Admin_Generic::render_description(). + * @codeCoverageIgnore - Deprecated */ public function render_advanced_description() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); printf( '

%s

', $this->_description ); } /** * Validate the `passwordless_method` option. * - * @deprecated 3.6.0 - The `passwordless_method` option was removed in this version. + * @deprecated - 3.6.0, the `passwordless_method` option was removed in this version. * * @param array $old_options - previous option values. * @param array $input - option values to be updated. * * @return mixed + * + * @codeCoverageIgnore - Deprecated */ public function connections_validation( $old_options, $input ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); return $input; } } diff --git a/lib/admin/WP_Auth0_Admin_Appearance.php b/lib/admin/WP_Auth0_Admin_Appearance.php index 6260a540..badc72c7 100644 --- a/lib/admin/WP_Auth0_Admin_Appearance.php +++ b/lib/admin/WP_Auth0_Admin_Appearance.php @@ -3,8 +3,7 @@ class WP_Auth0_Admin_Appearance extends WP_Auth0_Admin_Generic { /** - * - * @deprecated 3.6.0 - Use $this->_description instead + * @deprecated - 3.6.0, use $this->_description instead */ const APPEARANCE_DESCRIPTION = ''; @@ -294,12 +293,13 @@ public function basic_validation( $old_options, $input ) { } /** + * @deprecated - 3.6.0, handled by WP_Auth0_Admin_Generic::render_description() * - * @deprecated 3.6.0 - Handled by WP_Auth0_Admin_Generic::render_description() + * @codeCoverageIgnore - Deprecated */ public function render_appearance_description() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); printf( '

%s

', $this->_description ); } } diff --git a/lib/admin/WP_Auth0_Admin_Basic.php b/lib/admin/WP_Auth0_Admin_Basic.php index f094f6cc..f6c3d0aa 100755 --- a/lib/admin/WP_Auth0_Admin_Basic.php +++ b/lib/admin/WP_Auth0_Admin_Basic.php @@ -3,8 +3,9 @@ class WP_Auth0_Admin_Basic extends WP_Auth0_Admin_Generic { /** + * @deprecated - 3.6.0, use $this->_description instead * - * @deprecated 3.6.0 - Use $this->_description instead + * @codeCoverageIgnore - Deprecated */ const BASIC_DESCRIPTION = ''; @@ -362,30 +363,33 @@ public function basic_validation( $old_options, $input ) { } /** + * @deprecated - 3.6.0, should not be called directly, handled within WP_Auth0_Admin_Basic::render_allow_signup() * - * @deprecated 3.6.0 - Should not be called directly, handled within WP_Auth0_Admin_Basic::render_allow_signup() + * @codeCoverageIgnore - Deprecated */ public function render_allow_signup_regular_multisite() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } /** + * @deprecated - 3.6.0, should not be called directly, handled within WP_Auth0_Admin_Basic::render_allow_signup() * - * @deprecated 3.6.0 - Should not be called directly, handled within WP_Auth0_Admin_Basic::render_allow_signup() + * @codeCoverageIgnore - Deprecated */ public function render_allow_signup_regular() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } /** + * @deprecated - 3.6.0, handled by WP_Auth0_Admin_Generic::render_description() * - * @deprecated 3.6.0 - Handled by WP_Auth0_Admin_Generic::render_description() + * @codeCoverageIgnore - Deprecated */ public function render_basic_description() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); printf( '

%s

', $this->_description ); } } diff --git a/lib/admin/WP_Auth0_Admin_Dashboard.php b/lib/admin/WP_Auth0_Admin_Dashboard.php index d8b0327f..a5816c27 100644 --- a/lib/admin/WP_Auth0_Admin_Dashboard.php +++ b/lib/admin/WP_Auth0_Admin_Dashboard.php @@ -3,7 +3,9 @@ /** * Class WP_Auth0_Admin_Dashboard * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Admin_Dashboard extends WP_Auth0_Admin_Generic { @@ -18,13 +20,13 @@ class WP_Auth0_Admin_Dashboard extends WP_Auth0_Admin_Generic { /** * WP_Auth0_Admin_Dashboard constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. * * @param WP_Auth0_Options_Generic $options */ public function __construct( WP_Auth0_Options_Generic $options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); parent::__construct( $options ); $this->_description = __( 'Settings related to the dashboard widgets', 'wp-auth0' ); } diff --git a/lib/admin/WP_Auth0_Admin_Features.php b/lib/admin/WP_Auth0_Admin_Features.php index 3b8f9b72..91e43293 100644 --- a/lib/admin/WP_Auth0_Admin_Features.php +++ b/lib/admin/WP_Auth0_Admin_Features.php @@ -3,8 +3,7 @@ class WP_Auth0_Admin_Features extends WP_Auth0_Admin_Generic { /** - * - * @deprecated 3.6.0 - Use $this->_description instead + * @deprecated - 3.6.0, use $this->_description instead */ const FEATURES_DESCRIPTION = ''; @@ -482,12 +481,13 @@ public function incomerule_validation( $old_options, $input ) { } /** + * @deprecated - 3.6.0, handled by WP_Auth0_Admin_Generic::render_description() * - * @deprecated 3.6.0 - Handled by WP_Auth0_Admin_Generic::render_description() + * @codeCoverageIgnore - Deprecated */ public function render_features_description() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); printf( '

%s

', $this->_description ); } } diff --git a/lib/admin/WP_Auth0_Admin_Generic.php b/lib/admin/WP_Auth0_Admin_Generic.php index ef3f6d09..dc8b6bd1 100644 --- a/lib/admin/WP_Auth0_Admin_Generic.php +++ b/lib/admin/WP_Auth0_Admin_Generic.php @@ -277,12 +277,13 @@ protected function get_docs_link( $path, $text = '' ) { } /** + * @deprecated - 3.6.0, use WP_Auth0_Admin_Generic::render_switch() instead * - * @deprecated 3.6.0 - Use WP_Auth0_Admin_Generic::render_switch() instead + * @codeCoverageIgnore - Deprecated */ protected function render_a0_switch( $id, $name, $value, $checked ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $this->render_switch( $id, $name ); } } diff --git a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Age.php b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Age.php index 44531373..62219dd4 100644 --- a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Age.php +++ b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Age.php @@ -2,7 +2,9 @@ /** * Class WP_Auth0_Dashboard_Plugins_Age * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Dashboard_Plugins_Age extends WP_Auth0_Dashboard_Plugins_Generic { @@ -13,13 +15,13 @@ class WP_Auth0_Dashboard_Plugins_Age extends WP_Auth0_Dashboard_Plugins_Generic /** * WP_Auth0_Dashboard_Plugins_Age constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. * * @param WP_Auth0_Options $a0_options */ public function __construct( WP_Auth0_Options $a0_options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); $this->a0_options = $a0_options; $this->type = $this->a0_options->get( 'chart_age_type' ); } diff --git a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Gender.php b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Gender.php index a1796c2b..b5922151 100644 --- a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Gender.php +++ b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Gender.php @@ -2,7 +2,9 @@ /** * Class WP_Auth0_Dashboard_Plugins_Gender * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Dashboard_Plugins_Gender extends WP_Auth0_Dashboard_Plugins_Generic { @@ -17,13 +19,13 @@ class WP_Auth0_Dashboard_Plugins_Gender extends WP_Auth0_Dashboard_Plugins_Gener /** * WP_Auth0_Dashboard_Plugins_Gender constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. * * @param WP_Auth0_Options $a0_options */ public function __construct( WP_Auth0_Options $a0_options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); $this->a0_options = $a0_options; $this->type = $this->a0_options->get( 'chart_gender_type' ); } diff --git a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Generic.php b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Generic.php index 3c25a128..8428084b 100644 --- a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Generic.php +++ b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Generic.php @@ -2,18 +2,20 @@ /** * Class WP_Auth0_Dashboard_Plugins_Generic * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Dashboard_Plugins_Generic { /** * WP_Auth0_Dashboard_Plugins_Generic constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. */ public function __construct() { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); } protected function gettype( $user ) { diff --git a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_IdP.php b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_IdP.php index e7e5ce46..bf3ad8c3 100644 --- a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_IdP.php +++ b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_IdP.php @@ -2,7 +2,9 @@ /** * Class WP_Auth0_Dashboard_Plugins_IdP * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Dashboard_Plugins_IdP extends WP_Auth0_Dashboard_Plugins_Generic { @@ -13,13 +15,15 @@ class WP_Auth0_Dashboard_Plugins_IdP extends WP_Auth0_Dashboard_Plugins_Generic /** * WP_Auth0_Dashboard_Plugins_IdP constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. * * @param WP_Auth0_Options $a0_options + * + * @codeCoverageIgnore - Deprecated */ public function __construct( WP_Auth0_Options $a0_options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); $this->a0_options = $a0_options; $this->type = $this->a0_options->get( 'chart_idp_type' ); } diff --git a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Income.php b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Income.php index 16c621e2..1f545c7f 100644 --- a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Income.php +++ b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Income.php @@ -2,7 +2,9 @@ /** * Class WP_Auth0_Dashboard_Plugins_Income * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Dashboard_Plugins_Income extends WP_Auth0_Dashboard_Plugins_Generic { @@ -12,11 +14,11 @@ class WP_Auth0_Dashboard_Plugins_Income extends WP_Auth0_Dashboard_Plugins_Gener /** * WP_Auth0_Dashboard_Plugins_Income constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. */ public function __construct() { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); } public function render() { diff --git a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Location.php b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Location.php index 560957c9..c1731019 100644 --- a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Location.php +++ b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Location.php @@ -2,7 +2,9 @@ /** * Class WP_Auth0_Dashboard_Plugins_Location * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Dashboard_Plugins_Location extends WP_Auth0_Dashboard_Plugins_Generic { @@ -12,11 +14,11 @@ class WP_Auth0_Dashboard_Plugins_Location extends WP_Auth0_Dashboard_Plugins_Gen /** * WP_Auth0_Dashboard_Plugins_Location constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. */ public function __construct() { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); wp_enqueue_script( 'auth0-dashboard-gmaps-js', 'https://maps.googleapis.com/maps/api/js' ); wp_enqueue_script( 'auth0-markerclusterer', WPA0_PLUGIN_LIB_URL . 'markerclusterer.js' ); } diff --git a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Signups.php b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Signups.php index c68c5988..8e56df60 100644 --- a/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Signups.php +++ b/lib/dashboard-widgets/WP_Auth0_Dashboard_Plugins_Signups.php @@ -2,7 +2,9 @@ /** * Class WP_Auth0_Dashboard_Plugins_Signups * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Dashboard_Plugins_Signups extends WP_Auth0_Dashboard_Plugins_Generic { @@ -12,11 +14,11 @@ class WP_Auth0_Dashboard_Plugins_Signups extends WP_Auth0_Dashboard_Plugins_Gene /** * WP_Auth0_Dashboard_Plugins_Signups constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. */ public function __construct() { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); } protected function gettype( $user ) { diff --git a/lib/dashboard-widgets/WP_Auth0_Dashboard_Widgets.php b/lib/dashboard-widgets/WP_Auth0_Dashboard_Widgets.php index 1b3ca56a..c818f1df 100644 --- a/lib/dashboard-widgets/WP_Auth0_Dashboard_Widgets.php +++ b/lib/dashboard-widgets/WP_Auth0_Dashboard_Widgets.php @@ -2,7 +2,9 @@ /** * Class WP_Auth0_Dashboard_Widgets * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. + * + * @codeCoverageIgnore - Deprecated */ class WP_Auth0_Dashboard_Widgets { @@ -14,14 +16,14 @@ class WP_Auth0_Dashboard_Widgets { /** * WP_Auth0_Dashboard_Widgets constructor. * - * @deprecated 3.6.0 - The plugin no longer supports the dashboard widgets functionality. + * @deprecated - 3.6.0, the plugin no longer supports the dashboard widgets functionality. * * @param WP_Auth0_Options $a0_options * @param WP_Auth0_DBManager $db_manager */ public function __construct( WP_Auth0_Options $a0_options, WP_Auth0_DBManager $db_manager ) { // phpcs:ignore - trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Class %s is deprecated.', 'wp-auth0' ), __CLASS__ ), E_USER_DEPRECATED ); $this->db_manager = $db_manager; $this->a0_options = $a0_options; } diff --git a/lib/initial-setup/WP_Auth0_InitialSetup.php b/lib/initial-setup/WP_Auth0_InitialSetup.php index 7df09f3b..f2566195 100644 --- a/lib/initial-setup/WP_Auth0_InitialSetup.php +++ b/lib/initial-setup/WP_Auth0_InitialSetup.php @@ -62,7 +62,7 @@ public function init() { */ public function admin_enqueue() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } /** @@ -71,7 +71,7 @@ public function admin_enqueue() { */ public function notify_setup() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } public function notify_error() { diff --git a/lib/initial-setup/WP_Auth0_InitialSetup_Connections.php b/lib/initial-setup/WP_Auth0_InitialSetup_Connections.php index 6b14b573..802c9208 100644 --- a/lib/initial-setup/WP_Auth0_InitialSetup_Connections.php +++ b/lib/initial-setup/WP_Auth0_InitialSetup_Connections.php @@ -33,7 +33,7 @@ public function add_validation_error( $error ) { */ public function update_connection() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $provider_name = $_POST['connection']; @@ -51,7 +51,7 @@ public function update_connection() { */ protected function toggle_db() { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $domain = $this->a0_options->get( 'domain' ); $app_token = $this->a0_options->get( 'auth0_app_token' ); @@ -89,7 +89,7 @@ protected function toggle_db() { */ protected function toggle_social( $provider_name ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $provider_options = array( 'facebook' => array( diff --git a/lib/initial-setup/WP_Auth0_InitialSetup_Migration.php b/lib/initial-setup/WP_Auth0_InitialSetup_Migration.php index e69de8b5..ab1197ad 100644 --- a/lib/initial-setup/WP_Auth0_InitialSetup_Migration.php +++ b/lib/initial-setup/WP_Auth0_InitialSetup_Migration.php @@ -13,7 +13,7 @@ class WP_Auth0_InitialSetup_Migration { */ public function __construct( WP_Auth0_Options $a0_options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $this->a0_options = $a0_options; } diff --git a/lib/initial-setup/WP_Auth0_InitialSetup_Rules.php b/lib/initial-setup/WP_Auth0_InitialSetup_Rules.php index de90df6f..436532fd 100644 --- a/lib/initial-setup/WP_Auth0_InitialSetup_Rules.php +++ b/lib/initial-setup/WP_Auth0_InitialSetup_Rules.php @@ -10,12 +10,10 @@ class WP_Auth0_InitialSetup_Rules { /** * @deprecated - 3.8.0, not used and no replacement provided. - * - * @codeCoverageIgnore - Deprecated */ public function __construct( WP_Auth0_Options $a0_options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $this->a0_options = $a0_options; } diff --git a/lib/initial-setup/WP_Auth0_InitialSetup_Signup.php b/lib/initial-setup/WP_Auth0_InitialSetup_Signup.php index 2c56acb3..be1a83cf 100644 --- a/lib/initial-setup/WP_Auth0_InitialSetup_Signup.php +++ b/lib/initial-setup/WP_Auth0_InitialSetup_Signup.php @@ -13,7 +13,7 @@ class WP_Auth0_InitialSetup_Signup { */ public function __construct( WP_Auth0_Options $a0_options ) { // phpcs:ignore - trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); $this->a0_options = $a0_options; }