Docs: Remove unnecessary variables names from @return tags.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48100


git-svn-id: http://core.svn.wordpress.org/trunk@47869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2020-06-19 22:55:12 +00:00
parent 37234874a5
commit 1a77bb81d8
27 changed files with 42 additions and 42 deletions

View File

@ -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();

View File

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

View File

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

View File

@ -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' );

View File

@ -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();

View File

@ -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' );

View File

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

View File

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

View File

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

View File

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

View File

@ -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' );

View File

@ -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 = '<p class="description">', $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();

View File

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

View File

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

View File

@ -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();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 = '' );

View File

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

View File

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

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-48099';
$wp_version = '5.5-alpha-48100';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

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