From 50f2d7da7d65a1668d23bbf38bba87c0f48ccbb0 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 2 May 2022 13:11:07 +0000 Subject: [PATCH] Docs: Remove `@return void` from various DocBlocks. Per the documentation standards, it should not be used outside of the default bundled themes. Follow-up to [38767], [47055], [49697], [50956], [51003], [52069], [53255]. See #54729. git-svn-id: https://develop.svn.wordpress.org/trunk@53331 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-editor.php | 2 -- src/wp-includes/class-wp-customize-nav-menus.php | 3 --- src/wp-includes/pomo/translations.php | 1 - src/wp-includes/script-loader.php | 1 - src/wp-includes/theme-templates.php | 2 -- tests/phpunit/tests/kses.php | 2 -- tests/phpunit/tests/user/query.php | 11 +++-------- 7 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php index 688ec27c09..c872ae84fd 100644 --- a/src/wp-includes/block-editor.php +++ b/src/wp-includes/block-editor.php @@ -533,8 +533,6 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex * * @param string[] $preload_paths List of paths to preload. * @param WP_Block_Editor_Context $block_editor_context The current block editor context. - * - * @return void */ function block_editor_rest_api_preload( array $preload_paths, $block_editor_context ) { global $post, $wp_scripts, $wp_styles; diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php index 166800f222..ae0925fe02 100644 --- a/src/wp-includes/class-wp-customize-nav-menus.php +++ b/src/wp-includes/class-wp-customize-nav-menus.php @@ -1199,7 +1199,6 @@ final class WP_Customize_Nav_Menus { * @since 4.7.0 * * @param array $available_item_type Menu item data to output, including title, type, and label. - * @return void */ protected function print_post_type_container( $available_item_type ) { $id = sprintf( 'available-menu-items-%s-%s', $available_item_type['type'], $available_item_type['object'] ); @@ -1240,8 +1239,6 @@ final class WP_Customize_Nav_Menus { * Prints the markup for available menu item custom links. * * @since 4.7.0 - * - * @return void */ protected function print_custom_links_available_menu_item() { ?> diff --git a/src/wp-includes/pomo/translations.php b/src/wp-includes/pomo/translations.php index 0df56ad4fe..29ea11e45e 100644 --- a/src/wp-includes/pomo/translations.php +++ b/src/wp-includes/pomo/translations.php @@ -159,7 +159,6 @@ if ( ! class_exists( 'Translations', false ) ) : * Merge $other in the current object. * * @param Object $other Another Translation object, whose translations will be merged in this one (passed by reference). - * @return void */ public function merge_with( &$other ) { foreach ( $other->entries as $entry ) { diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 6bdbc5c2f4..ae68e688f8 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -2933,7 +2933,6 @@ function wp_enqueue_block_support_styles( $style ) { * * @param string $block_name The block-name, including namespace. * @param array $args An array of arguments [handle,src,deps,ver,media]. - * @return void */ function wp_enqueue_block_style( $block_name, $args ) { $args = wp_parse_args( diff --git a/src/wp-includes/theme-templates.php b/src/wp-includes/theme-templates.php index e837a2fad5..16bd5e2d77 100644 --- a/src/wp-includes/theme-templates.php +++ b/src/wp-includes/theme-templates.php @@ -105,8 +105,6 @@ function wp_filter_wp_template_unique_post_slug( $override_slug, $slug, $post_ID * @since 5.8.0 * * @global string $_wp_current_template_content - * - * @return void */ function the_block_template_skip_link() { global $_wp_current_template_content; diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index fc6882242f..e6cac09c3b 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -61,7 +61,6 @@ class Tests_Kses extends WP_UnitTestCase { * * @param string $string Test string for kses. * @param string $expect_string Expected result after passing through kses. - * @return void */ public function test_wp_filter_post_kses_a( $string, $expect_string ) { global $allowedposttags; @@ -169,7 +168,6 @@ class Tests_Kses extends WP_UnitTestCase { * * @param string $string Test string for kses. * @param string $expect_string Expected result after passing through kses. - * @return void */ public function test_wp_filter_post_kses_abbr( $string, $expect_string ) { global $allowedposttags; diff --git a/tests/phpunit/tests/user/query.php b/tests/phpunit/tests/user/query.php index eac4efd7a7..fb4f5f89fe 100644 --- a/tests/phpunit/tests/user/query.php +++ b/tests/phpunit/tests/user/query.php @@ -1969,15 +1969,12 @@ class Tests_User_Query extends WP_UnitTestCase { /** * @ticket 53177 - * - * @param $field - * @param $expected - * - * @return void - * * @dataProvider data_returning_fields * * @covers WP_User_Query::prepare_query + * + * @param $field + * @param $expected */ public function test_returning_fields( $field, $expected_values ) { $q = new WP_User_Query( @@ -2101,8 +2098,6 @@ class Tests_User_Query extends WP_UnitTestCase { /** * @ticket 53177 * - * @return void - * * @covers WP_User_Query::prepare_query */ public function test_returning_field_user_registered() {