From 1db25e3d3841e47e07eb71bf2b2c609cb37e71a1 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 19 Jun 2020 22:53:54 +0000 Subject: [PATCH] Docs: Remove unnecessary variables names from `@return` tags. See #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48100 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/misc.php | 2 +- src/wp-admin/includes/nav-menu.php | 2 +- src/wp-admin/includes/privacy-tools.php | 10 +++++----- src/wp-includes/category.php | 4 ++-- src/wp-includes/class-wp-customize-manager.php | 2 +- src/wp-includes/class-wp-customize-nav-menus.php | 2 +- src/wp-includes/class-wp-image-editor.php | 2 +- src/wp-includes/class-wp-query.php | 2 +- .../class-wp-recovery-mode-key-service.php | 4 ++-- src/wp-includes/comment.php | 4 ++-- src/wp-includes/formatting.php | 8 ++++---- src/wp-includes/functions.php | 4 ++-- src/wp-includes/general-template.php | 2 +- src/wp-includes/link-template.php | 2 +- src/wp-includes/load.php | 2 +- src/wp-includes/media.php | 4 ++-- src/wp-includes/meta.php | 2 +- src/wp-includes/nav-menu.php | 4 ++-- src/wp-includes/pluggable.php | 2 +- src/wp-includes/query.php | 4 ++-- .../endpoints/class-wp-rest-terms-controller.php | 4 ++-- .../endpoints/class-wp-rest-users-controller.php | 2 +- .../sitemaps/class-wp-sitemaps-provider.php | 2 +- .../sitemaps/providers/class-wp-sitemaps-users.php | 2 +- src/wp-includes/user.php | 2 +- src/wp-includes/wp-db.php | 2 +- tests/phpunit/tests/admin/wpPrivacyRequestsTable.php | 4 ++-- .../phpunit/tests/ajax/PrivacyErasePersonalData.php | 2 +- tests/phpunit/tests/customize/selective-refresh.php | 2 +- tests/phpunit/tests/functions/anonymization.php | 2 +- .../wpPrivacySendErasureFulfillmentNotification.php | 8 ++++---- .../privacy/wpPrivacySendPersonalDataExportEmail.php | 12 ++++++------ .../wpPrivacySendRequestConfirmationNotification.php | 2 +- tests/phpunit/tests/user.php | 4 ++-- tests/phpunit/tests/user/wpSendUserRequest.php | 4 ++-- 35 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index e0d4ddc5bc..f6e5d68f6d 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -1419,7 +1419,7 @@ function _wp_privacy_settings_filter_draft_page_titles( $title, $page ) { * @since 5.1.0 * @since 5.1.1 Added the {@see 'wp_is_php_version_acceptable'} filter. * - * @return array|false $response Array of PHP version data. False on failure. + * @return array|false Array of PHP version data. False on failure. */ function wp_check_php_version() { $version = phpversion(); diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index b4ba257153..ed786c9e2c 100644 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -1023,7 +1023,7 @@ function _wp_nav_menu_meta_box_object( $object = null ) { * @since 3.0.0 * * @param int $menu_id Optional. The ID of the menu to format. Default 0. - * @return string|WP_Error $output The menu formatted to edit or error object on failure. + * @return string|WP_Error The menu formatted to edit or error object on failure. */ function wp_get_nav_menu_to_edit( $menu_id = 0 ) { $menu = wp_get_nav_menu_object( $menu_id ); diff --git a/src/wp-admin/includes/privacy-tools.php b/src/wp-admin/includes/privacy-tools.php index 2d35984499..a23a1732bb 100644 --- a/src/wp-admin/includes/privacy-tools.php +++ b/src/wp-admin/includes/privacy-tools.php @@ -40,8 +40,8 @@ function _wp_privacy_resend_request( $request_id ) { * @since 4.9.6 * @access private * - * @param int $request_id Request ID. - * @return int|WP_Error $result Request ID on success or WP_Error. + * @param int $request_id Request ID. + * @return int|WP_Error Request ID on success, or a WP_Error on failure. */ function _wp_privacy_completed_request( $request_id ) { // Get the request. @@ -233,9 +233,9 @@ function _wp_personal_data_cleanup_requests() { * } * } * } - * @param string $group_id The group identifier. - * @param int $groups_count The number of all groups - * @return string $group_html The HTML for this group and its items. + * @param string $group_id The group identifier. + * @param int $groups_count The number of all groups + * @return string The HTML for this group and its items. */ function wp_privacy_generate_personal_data_export_group_html( $group_data, $group_id = '', $groups_count = 1 ) { $group_id_attr = sanitize_title_with_dashes( $group_data['group_label'] . '-' . $group_id ); diff --git a/src/wp-includes/category.php b/src/wp-includes/category.php index 527bc11a77..843c51d0da 100644 --- a/src/wp-includes/category.php +++ b/src/wp-includes/category.php @@ -287,8 +287,8 @@ function sanitize_category_field( $field, $value, $cat_id, $context ) { * * @type string $taxonomy Taxonomy to retrieve terms for. Default 'post_tag'. * } - * @return WP_Term[]|int|WP_Error $tags Array of 'post_tag' term objects, a count thereof, - * or WP_Error if any of the taxonomies do not exist. + * @return WP_Term[]|int|WP_Error Array of 'post_tag' term objects, a count thereof, + * or WP_Error if any of the taxonomies do not exist. */ function get_tags( $args = '' ) { $defaults = array( 'taxonomy' => 'post_tag' ); diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 4c67962856..f8f92f319b 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -1814,7 +1814,7 @@ final class WP_Customize_Manager { * @param WP_Customize_Setting $setting A WP_Customize_Setting derived object. * @param mixed $default Value returned $setting has no post value (added in 4.2.0) * or the post value is invalid (added in 4.6.0). - * @return string|mixed $post_value Sanitized value or the $default provided. + * @return string|mixed Sanitized value or the $default provided. */ public function post_value( $setting, $default = null ) { $post_values = $this->unsanitized_post_values(); diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php index fd46c1be85..962a3ce60c 100644 --- a/src/wp-includes/class-wp-customize-nav-menus.php +++ b/src/wp-includes/class-wp-customize-nav-menus.php @@ -76,7 +76,7 @@ final class WP_Customize_Nav_Menus { * @since 4.5.0 * * @param string[] $nonces Array of nonces. - * @return string[] $nonces Modified array of nonces. + * @return string[] Modified array of nonces. */ public function filter_nonces( $nonces ) { $nonces['customize-menus'] = wp_create_nonce( 'customize-menus' ); diff --git a/src/wp-includes/class-wp-image-editor.php b/src/wp-includes/class-wp-image-editor.php index b052dec339..b6f2ec10ca 100644 --- a/src/wp-includes/class-wp-image-editor.php +++ b/src/wp-includes/class-wp-image-editor.php @@ -205,7 +205,7 @@ abstract class WP_Image_Editor { * * @since 4.0.0 * - * @return int $quality Compression Quality. Range: [1,100] + * @return int Compression Quality. Range: [1,100] */ public function get_quality() { if ( ! $this->quality ) { diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index 3461239cb7..a0b75b7859 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -4294,7 +4294,7 @@ class WP_Query { * @since 5.2.0 * * @param WP_Post|object|int $post WP_Post instance or Post ID/object. - * @return array|bool $elements Elements of post or false on failure. + * @return array|bool Elements of post or false on failure. */ public function generate_postdata( $post ) { diff --git a/src/wp-includes/class-wp-recovery-mode-key-service.php b/src/wp-includes/class-wp-recovery-mode-key-service.php index b33c4a1697..6e533d04a9 100644 --- a/src/wp-includes/class-wp-recovery-mode-key-service.php +++ b/src/wp-includes/class-wp-recovery-mode-key-service.php @@ -26,7 +26,7 @@ final class WP_Recovery_Mode_Key_Service { * * @since 5.2.0 * - * @return string $token A random string to identify its associated key in storage. + * @return string A random string to identify its associated key in storage. */ public function generate_recovery_mode_token() { return wp_generate_password( 22, false ); @@ -40,7 +40,7 @@ final class WP_Recovery_Mode_Key_Service { * @global PasswordHash $wp_hasher * * @param string $token A token generated by {@see generate_recovery_mode_token()}. - * @return string $key Recovery mode key. + * @return string Recovery mode key. */ public function generate_and_store_recovery_mode_key( $token ) { diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index d18c462731..ff11dc004c 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -156,8 +156,8 @@ function check_comment( $author, $email, $url, $comment, $user_ip, $user_agent, * * @param int $post_id The ID of the post. * @param array $args Optional. See WP_Comment_Query::__construct() for information on accepted arguments. - * @return int|array $comments The approved comments, or number of comments if `$count` - * argument is true. + * @return int|array The approved comments, or number of comments if `$count` + * argument is true. */ function get_approved_comments( $post_id, $args = array() ) { if ( ! $post_id ) { diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 6c652d3b07..a8aa8e99ba 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -2761,7 +2761,7 @@ function stripslashes_deep( $value ) { * @since 4.4.0 * * @param mixed $value The array or string to be stripped. - * @return mixed $value The stripped value. + * @return mixed The stripped value. */ function stripslashes_from_strings_only( $value ) { return is_string( $value ) ? stripslashes( $value ) : $value; @@ -2773,7 +2773,7 @@ function stripslashes_from_strings_only( $value ) { * @since 2.2.0 * * @param mixed $value The array or string to be encoded. - * @return mixed $value The encoded value. + * @return mixed The encoded value. */ function urlencode_deep( $value ) { return map_deep( $value, 'urlencode' ); @@ -2785,7 +2785,7 @@ function urlencode_deep( $value ) { * @since 3.4.0 * * @param mixed $value The array or string to be encoded. - * @return mixed $value The encoded value. + * @return mixed The encoded value. */ function rawurlencode_deep( $value ) { return map_deep( $value, 'rawurlencode' ); @@ -2797,7 +2797,7 @@ function rawurlencode_deep( $value ) { * @since 4.4.0 * * @param mixed $value The array or string to be decoded. - * @return mixed $value The decoded value. + * @return mixed The decoded value. */ function urldecode_deep( $value ) { return map_deep( $value, 'urldecode' ); diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 27edc32205..a622479be8 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -6981,7 +6981,7 @@ function wp_unique_id( $prefix = '' ) { * * @param string $group Where the cache contents are grouped. * - * @return string $last_changed UNIX timestamp with microseconds representing when the group was last changed. + * @return string UNIX timestamp with microseconds representing when the group was last changed. */ function wp_cache_get_last_changed( $group ) { $last_changed = wp_cache_get( 'last_changed', $group ); @@ -7395,7 +7395,7 @@ function wp_update_php_annotation( $before = '

', $after = * * @since 5.2.0 * - * @return string $message Update PHP page annotation. An empty string if no custom URLs are provided. + * @return string Update PHP page annotation. An empty string if no custom URLs are provided. */ function wp_get_update_php_annotation() { $update_url = wp_get_update_php_url(); diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 90bcdcec6a..22bea10cdf 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -4753,7 +4753,7 @@ function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs * @since 3.6.0 * * @param array $settings - * @return array $settings + * @return array Heartbeat settings. */ function wp_heartbeat_settings( $settings ) { if ( ! is_admin() ) { diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index 6f3eb5d031..df3143b5aa 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -3629,7 +3629,7 @@ function self_admin_url( $path = '', $scheme = 'admin' ) { * @param string $url Absolute URL that includes a scheme * @param string|null $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login', * 'login_post', 'admin', 'relative', 'rest', 'rpc', or null. Default null. - * @return string $url URL with chosen scheme. + * @return string URL with chosen scheme. */ function set_url_scheme( $url, $scheme = null ) { $orig_scheme = $scheme; diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 3381f5eb3b..1fa88e1c8b 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -721,7 +721,7 @@ function wp_get_mu_plugins() { * @since 3.0.0 * @access private * - * @return string[] $plugin_file Array of paths to plugin files relative to the plugins directory. + * @return string[] Array of paths to plugin files relative to the plugins directory. */ function wp_get_active_and_valid_plugins() { $plugins = array(); diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 969adf9d6d..e38b5f0e3f 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -747,7 +747,7 @@ function wp_image_matches_ratio( $source_width, $source_height, $target_width, $ * @param array|string $size Optional. Image size. Accepts any valid image size, or an array * of width and height values in pixels (in that order). * Default 'thumbnail'. - * @return array|false $data { + * @return array|false { * Array of file relative path, width, and height on success. Additionally includes absolute * path and URL if registered size is passed to $size parameter. False on failure. * @@ -4549,7 +4549,7 @@ function wp_register_media_personal_data_exporter( $exporters ) { * * @param string $email_address The attachment owner email address. * @param int $page Attachment page. - * @return array $return An array of personal data. + * @return array An array of personal data. */ function wp_media_personal_data_exporter( $email_address, $page = 1 ) { // Limit us to 50 attachments at a time to avoid timing out. diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php index 01912e123c..e9d3568455 100644 --- a/src/wp-includes/meta.php +++ b/src/wp-includes/meta.php @@ -983,7 +983,7 @@ function update_meta_cache( $meta_type, $object_ids ) { * * @since 4.5.0 * - * @return WP_Metadata_Lazyloader $lazyloader Metadata lazyloader queue. + * @return WP_Metadata_Lazyloader Metadata lazyloader queue. */ function wp_metadata_lazyloader() { static $wp_metadata_lazyloader; diff --git a/src/wp-includes/nav-menu.php b/src/wp-includes/nav-menu.php index ed7c98de19..d3667448c1 100644 --- a/src/wp-includes/nav-menu.php +++ b/src/wp-includes/nav-menu.php @@ -668,7 +668,7 @@ function _is_valid_nav_menu_item( $item ) { * processed in this function. Default 'menu_order'. * @type bool $nopaging Whether to retrieve all menu items (true) or paginate (false). Default true. * } - * @return array|false $items Array of menu items, otherwise false. + * @return array|false Array of menu items, otherwise false. */ function wp_get_nav_menu_items( $menu, $args = array() ) { $menu = wp_get_nav_menu_object( $menu ); @@ -803,7 +803,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) { * @since 3.0.0 * * @param object $menu_item The menu item to modify. - * @return object $menu_item The menu item with standard menu item properties. + * @return object The menu item with standard menu item properties. */ function wp_setup_nav_menu_item( $menu_item ) { if ( isset( $menu_item->post_type ) ) { diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index f3d4e8494c..c66beea1dd 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -1380,7 +1380,7 @@ if ( ! function_exists( 'wp_safe_redirect' ) ) : * @param string $location The path or URL to redirect to. * @param int $status Optional. HTTP response status code to use. Default '302' (Moved Temporarily). * @param string $x_redirect_by Optional. The application doing the redirect. Default 'WordPress'. - * @return bool $redirect False if the redirect was cancelled, true otherwise. + * @return bool False if the redirect was cancelled, true otherwise. */ function wp_safe_redirect( $location, $status = 302, $x_redirect_by = 'WordPress' ) { diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index 69055b3930..d30f037047 100644 --- a/src/wp-includes/query.php +++ b/src/wp-includes/query.php @@ -1090,7 +1090,7 @@ function wp_old_slug_redirect() { * @global wpdb $wpdb WordPress database abstraction object. * * @param string $post_type The current post type based on the query vars. - * @return int $id The Post ID. + * @return int The Post ID. */ function _find_post_by_old_slug( $post_type ) { global $wpdb; @@ -1125,7 +1125,7 @@ function _find_post_by_old_slug( $post_type ) { * @global wpdb $wpdb WordPress database abstraction object. * * @param string $post_type The current post type based on the query vars. - * @return int $id The Post ID. + * @return int The Post ID. */ function _find_post_by_old_date( $post_type ) { global $wpdb; diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index ca7d623429..6ff5978d3c 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php @@ -719,7 +719,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller { * @since 4.7.0 * * @param WP_REST_Request $request Request object. - * @return object $prepared_term Term object. + * @return object Term object. */ public function prepare_item_for_database( $request ) { $prepared_term = new stdClass; @@ -776,7 +776,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller { * * @param WP_Term $item Term object. * @param WP_REST_Request $request Request object. - * @return WP_REST_Response $response Response object. + * @return WP_REST_Response Response object. */ public function prepare_item_for_response( $item, $request ) { diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index 3d966ded4d..fb6abc1985 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -1095,7 +1095,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller { * @since 4.7.0 * * @param WP_REST_Request $request Request object. - * @return object $prepared_user User object. + * @return object User object. */ protected function prepare_item_for_database( $request ) { $prepared_user = new stdClass; diff --git a/src/wp-includes/sitemaps/class-wp-sitemaps-provider.php b/src/wp-includes/sitemaps/class-wp-sitemaps-provider.php index 42e9e7e54e..924aca068c 100644 --- a/src/wp-includes/sitemaps/class-wp-sitemaps-provider.php +++ b/src/wp-includes/sitemaps/class-wp-sitemaps-provider.php @@ -42,7 +42,7 @@ abstract class WP_Sitemaps_Provider { * * @param int $page_num Page of results. * @param string $object_subtype Optional. Object subtype name. Default empty. - * @return array $url_list Array of URLs for a sitemap. + * @return array Array of URLs for a sitemap. */ abstract public function get_url_list( $page_num, $object_subtype = '' ); diff --git a/src/wp-includes/sitemaps/providers/class-wp-sitemaps-users.php b/src/wp-includes/sitemaps/providers/class-wp-sitemaps-users.php index ddcad330d2..93e63a3b51 100644 --- a/src/wp-includes/sitemaps/providers/class-wp-sitemaps-users.php +++ b/src/wp-includes/sitemaps/providers/class-wp-sitemaps-users.php @@ -127,7 +127,7 @@ class WP_Sitemaps_Users extends WP_Sitemaps_Provider { * * @since 5.5.0 * - * @return array $args Array of WP_User_Query arguments. + * @return array Array of WP_User_Query arguments. */ protected function get_users_query_args() { $public_post_types = get_post_types( diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index c174c3cedb..9452e23b19 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -3530,7 +3530,7 @@ All at ###SITENAME### * @access private * * @param int $request_id The request ID being confirmed. - * @return string $message The confirmation message. + * @return string The confirmation message. */ function _wp_privacy_account_request_confirmed_message( $request_id ) { $request = wp_get_user_request( $request_id ); diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index 54c7c0b4e6..bc927c13c6 100644 --- a/src/wp-includes/wp-db.php +++ b/src/wp-includes/wp-db.php @@ -3296,7 +3296,7 @@ class wpdb { * @since 4.2.0 * * @param string $query The query to search. - * @return string|false $table The table name found, or false if a table couldn't be found. + * @return string|false The table name found, or false if a table couldn't be found. */ protected function get_table_from_query( $query ) { // Remove characters that can legally trail the table name. diff --git a/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php b/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php index debe163862..b73701787c 100644 --- a/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php +++ b/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php @@ -21,7 +21,7 @@ class Tests_Admin_WpPrivacyRequestsTable extends WP_UnitTestCase { * * @since 5.1.0 * - * @return PHPUnit_Framework_MockObject_MockObject|WP_Privacy_Requests_Table $instance Mocked class instance. + * @return PHPUnit_Framework_MockObject_MockObject|WP_Privacy_Requests_Table Mocked class instance. */ public function get_mocked_class_instance() { $args = array( @@ -91,7 +91,7 @@ class Tests_Admin_WpPrivacyRequestsTable extends WP_UnitTestCase { * @since 5.1.0 * * @param string $request The complete SQL query. - * @return string $request The complete SQL query. + * @return string The complete SQL query. */ public function filter_posts_request( $request ) { $this->sql = $request; diff --git a/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php b/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php index e75b12f805..3eb54a6df4 100644 --- a/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php +++ b/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php @@ -784,7 +784,7 @@ class Tests_Ajax_PrivacyErasePersonalData extends WP_Ajax_UnitTestCase { * @param string $email_address The comment author email address. * @param int $page Page number. * - * @return array $return Erase data. + * @return array Erase data. */ public function callback_personal_data_eraser( $email_address, $page = 1 ) { if ( 1 === $page ) { diff --git a/tests/phpunit/tests/customize/selective-refresh.php b/tests/phpunit/tests/customize/selective-refresh.php index 9533d7473e..1484680219 100644 --- a/tests/phpunit/tests/customize/selective-refresh.php +++ b/tests/phpunit/tests/customize/selective-refresh.php @@ -204,7 +204,7 @@ class Test_WP_Customize_Selective_Refresh extends WP_UnitTestCase { * * @param false|array $partial_args The arguments to the WP_Customize_Partial constructor. * @param string $partial_id ID for dynamic partial. - * @return false|array $args Dynamic partial args. + * @return false|array Dynamic partial args. */ function filter_customize_dynamic_partial_args( $partial_args, $partial_id ) { $this->assertTrue( false === $partial_args || is_array( $partial_args ) ); diff --git a/tests/phpunit/tests/functions/anonymization.php b/tests/phpunit/tests/functions/anonymization.php index e52ff43628..231df96035 100644 --- a/tests/phpunit/tests/functions/anonymization.php +++ b/tests/phpunit/tests/functions/anonymization.php @@ -266,7 +266,7 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { * @param string $anonymous Anonymized data. * @param string $type Type of the data. * @param string $data Original data. - * @return string $anonymous Anonymized data. + * @return string Anonymized data. */ public function filter_wp_privacy_anonymize_data( $anonymous, $type, $data ) { if ( 'url' === $type && 'example.com' === parse_url( $data, PHP_URL_HOST ) ) { diff --git a/tests/phpunit/tests/privacy/wpPrivacySendErasureFulfillmentNotification.php b/tests/phpunit/tests/privacy/wpPrivacySendErasureFulfillmentNotification.php index 5a2b1c62a4..a30b73f6d9 100644 --- a/tests/phpunit/tests/privacy/wpPrivacySendErasureFulfillmentNotification.php +++ b/tests/phpunit/tests/privacy/wpPrivacySendErasureFulfillmentNotification.php @@ -198,7 +198,7 @@ class Tests_Privacy_WpPrivacySendErasureFulfillmentNotification extends WP_UnitT * @since 5.1.0 * * @param string $user_email The email address of the notification recipient. - * @return string $user_email The email address of the notification recipient. + * @return string The email address of the notification recipient. */ public function filter_email_address( $user_email ) { return 'modified-' . $user_email; @@ -224,7 +224,7 @@ class Tests_Privacy_WpPrivacySendErasureFulfillmentNotification extends WP_UnitT * @since 5.1.0 * * @param string $subject The email subject. - * @return string $subject The email subject. + * @return string The email subject. */ public function filter_email_subject( $subject ) { return 'Modified subject'; @@ -250,7 +250,7 @@ class Tests_Privacy_WpPrivacySendErasureFulfillmentNotification extends WP_UnitT * @since 5.1.0 * * @param string $email_text Text in the email. - * @return string $email_text Text in the email. + * @return string Text in the email. */ public function filter_email_body_text( $email_text ) { return 'Modified text'; @@ -278,7 +278,7 @@ class Tests_Privacy_WpPrivacySendErasureFulfillmentNotification extends WP_UnitT * @since 5.4.0 * * @param string|array $headers The email headers. - * @return array $headers The new email headers. + * @return array The new email headers. */ public function modify_email_headers( $headers ) { $headers = array( diff --git a/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php b/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php index 06863187c9..54860b11e9 100644 --- a/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php +++ b/tests/phpunit/tests/privacy/wpPrivacySendPersonalDataExportEmail.php @@ -167,7 +167,7 @@ class Tests_Privacy_WpPrivacySendPersonalDataExportEmail extends WP_UnitTestCase * @since 4.9.6 * * @param int $expiration The expiration age of the export, in seconds. - * @return int $expiration The expiration age of the export, in seconds. + * @return int The expiration age of the export, in seconds. */ public function modify_export_expiration( $expiration ) { // Set date to always be "Mon, 18 Dec 2017 21:30:00 GMT", so can assert a fixed date. @@ -194,7 +194,7 @@ class Tests_Privacy_WpPrivacySendPersonalDataExportEmail extends WP_UnitTestCase * @since 5.3.0 * * @param string $user_email The email address of the notification recipient. - * @return string $user_email The modified email address of the notification recipient. + * @return string The modified email address of the notification recipient. */ public function filter_email_address( $user_email ) { return 'modified-' . $user_email; @@ -220,7 +220,7 @@ class Tests_Privacy_WpPrivacySendPersonalDataExportEmail extends WP_UnitTestCase * @since 5.3.0 * * @param string $subject The email subject. - * @return string $subject The email subject. + * @return string The email subject. */ public function filter_email_subject( $subject ) { return 'Modified subject'; @@ -246,7 +246,7 @@ class Tests_Privacy_WpPrivacySendPersonalDataExportEmail extends WP_UnitTestCase * * @param string $email_text Text in the email. * @param int $request_id The request ID for this personal data export. - * @return string $email_text Text in the email. + * @return string Text in the email. */ public function modify_email_content( $email_text, $request_id ) { return 'Custom content for request ID: ' . $request_id; @@ -274,7 +274,7 @@ class Tests_Privacy_WpPrivacySendPersonalDataExportEmail extends WP_UnitTestCase * @since 5.4.0 * * @param string|array $headers The email headers. - * @return array $headers The new email headers. + * @return array The new email headers. */ public function modify_email_headers( $headers ) { $headers = array( @@ -319,7 +319,7 @@ class Tests_Privacy_WpPrivacySendPersonalDataExportEmail extends WP_UnitTestCase * @type string $siteurl The site URL sending the mail. * } * - * @return string $email_text Text in the email. + * @return string Text in the email. */ public function modify_email_content_with_email_data( $email_text, $request_id, $email_data ) { return 'Custom content using the $site_url of $email_data: ' . $email_data['siteurl']; diff --git a/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php b/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php index 3198e4b439..ce76fa2f43 100644 --- a/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php +++ b/tests/phpunit/tests/privacy/wpPrivacySendRequestConfirmationNotification.php @@ -235,7 +235,7 @@ class Tests_User_WpPrivacySendRequestConfirmationNotification extends WP_UnitTes * @since 5.4.0 * * @param string|array $headers The email headers. - * @return array $headers The new email headers. + * @return array The new email headers. */ public function modify_email_headers( $headers ) { $headers = array( diff --git a/tests/phpunit/tests/user.php b/tests/phpunit/tests/user.php index 18760214bb..d3e9a581e5 100644 --- a/tests/phpunit/tests/user.php +++ b/tests/phpunit/tests/user.php @@ -1907,7 +1907,7 @@ class Tests_User extends WP_UnitTestCase { * * @ticket 47509 * - * @return array $additional_profile_data The additional user data. + * @return array The additional user data. */ public function export_additional_user_profile_data() { $additional_profile_data = array( @@ -1930,7 +1930,7 @@ class Tests_User extends WP_UnitTestCase { * * @ticket 47509 * - * @return array $additional_profile_data The additional user data. + * @return array The additional user data. */ public function export_additional_user_profile_data_with_dup_name() { $additional_profile_data = array( diff --git a/tests/phpunit/tests/user/wpSendUserRequest.php b/tests/phpunit/tests/user/wpSendUserRequest.php index 3f240545fc..a13444e486 100644 --- a/tests/phpunit/tests/user/wpSendUserRequest.php +++ b/tests/phpunit/tests/user/wpSendUserRequest.php @@ -222,7 +222,7 @@ class Tests_User_WpSendUserRequest extends WP_UnitTestCase { * @since 4.9.9 * * @param string $email_text Confirmation email text. - * @return string $email_text Filtered email text. + * @return string Filtered email text. */ public function modify_email_content( $email_text ) { return 'Custom Email Content.'; @@ -252,7 +252,7 @@ class Tests_User_WpSendUserRequest extends WP_UnitTestCase { * @since 5.4.0 * * @param string|array $headers The email headers. - * @return array $headers The new email headers. + * @return array The new email headers. */ public function modify_email_headers( $headers ) { $headers = array(