Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove return void that should not exist #5484

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/wp-includes/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ function _flatten_blocks( &$blocks ) {
* @access private
*
* @param array $block a parsed block.
* @return void
*/
function _inject_theme_attribute_in_template_part_block( &$block ) {
if (
Expand All @@ -496,7 +495,6 @@ function _inject_theme_attribute_in_template_part_block( &$block ) {
* @access private
*
* @param array $block a parsed block.
* @return void
*/
function _remove_theme_attribute_from_template_part_block( &$block ) {
if (
Expand Down
2 changes: 0 additions & 2 deletions src/wp-includes/class-wp-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,6 @@ public function parent() {
* Perform reinitialization tasks.
*
* Prevents a callback from being injected during unserialization of an object.
*
* @return void
*/
public function __wakeup() {
if ( $this->parent && ! $this->parent instanceof self ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ public function __construct() {
* Registers the controllers routes.
*
* @since 6.3.0
*
* @return void
*/
public function register_routes() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public function create_object( $args ) {
*
* @param int $blog_id ID of the site to update.
* @param array $fields The fields to update.
*
* @return void
*/
public function update_object( $blog_id, $fields ) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public function create_object( $args ) {
*
* @param int $network_id ID of the network to update.
* @param array $fields The fields to update.
*
* @return void
*/
public function update_object( $network_id, $fields ) {}

Expand Down
7 changes: 0 additions & 7 deletions tests/phpunit/includes/object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,6 @@ function wp_cache_set_option( $option, $value ) {
* Switches blog prefix, which changes the cache that is accessed.
*
* @param int $blog_id Blog to switch to.
* @return void
*/
function wp_cache_switch_to_blog( $blog_id ) {
global $wp_object_cache;
Expand All @@ -832,7 +831,6 @@ function wp_cache_switch_to_blog( $blog_id ) {
* Sets up Object Cache Global and assigns it.
*
* @global WP_Object_Cache $wp_object_cache WordPress Object Cache
* @return void
*/
function wp_cache_init() {
global $wp_object_cache;
Expand All @@ -843,7 +841,6 @@ function wp_cache_init() {
* Adds a group or set of groups to the list of non-persistent groups.
*
* @param string|array $groups A group or an array of groups to add.
* @return void
*/
function wp_cache_add_global_groups( $groups ) {
global $wp_object_cache;
Expand All @@ -854,7 +851,6 @@ function wp_cache_add_global_groups( $groups ) {
* Adds a group or set of groups to the list of non-Memcached groups.
*
* @param string|array $groups A group or an array of groups to add.
* @return void
*/
function wp_cache_add_non_persistent_groups( $groups ) {
global $wp_object_cache;
Expand Down Expand Up @@ -2329,7 +2325,6 @@ public function contains_no_mc_group( $groups ) {
* @link http://wordpress.org/extend/plugins/memcached/
*
* @param array $groups Array of groups.
* @return void
*/
public function add_global_groups( $groups ) {
if ( ! is_array( $groups ) ) {
Expand All @@ -2349,7 +2344,6 @@ public function add_global_groups( $groups ) {
* @link http://wordpress.org/extend/plugins/memcached/
*
* @param array $groups Array of groups.
* @return void
*/
public function add_non_persistent_groups( $groups ) {
if ( ! is_array( $groups ) ) {
Expand Down Expand Up @@ -2381,7 +2375,6 @@ public function get_from_runtime_cache( $key, $group ) {
* Switches blog prefix, which changes the cache that is accessed.
*
* @param int $blog_id Blog to switch to.
* @return void
*/
public function switch_to_blog( $blog_id ) {
global $table_prefix;
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/tests/admin/includesPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -1144,8 +1144,6 @@ public function test_post_exists_should_not_match_invalid_post_type_and_status_c

/**
* Test refreshed nonce for metabox loader.
*
* @return void
*/
public function test_user_get_refreshed_metabox_nonce() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public function tear_down() {
* @ticket 59578
*
* @covers ::wp_render_elements_support
*
* @return void
*/
public function test_leaves_block_content_alone_when_block_type_not_registered() {
$block = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ public function test_finds_correct_tag_given_breadcrumbs( $html, $breadcrumbs, $
* @param string $html HTML string with tags in it, one of which contains the "target" attribute.
* @param array $breadcrumbs Breadcrumbs of element with "target" attribute set.
* @param int $ignored_n Not used in this test but provided in the dataset for other tests.
* @return void
*/
public function test_reports_correct_breadcrumbs_for_html( $html, $breadcrumbs, $ignored_n ) {
$p = WP_HTML_Processor::create_fragment( $html );
Expand Down