Skip to content

Commit

Permalink
Coding Standards: Document intentional case block fall-throughs.
Browse files Browse the repository at this point in the history
Fixes `PSR2.ControlStructures.SwitchDeclaration.TerminatingComment` violations.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44565 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
pento committed Jan 11, 2019
1 parent d0f00b5 commit 83af032
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/wp-admin/includes/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,7 @@ function upgrade_330() {
$sidebars_widgets = $_sidebars_widgets;
unset( $_sidebars_widgets );

// intentional fall-through to upgrade to the next version.
case 2:
$sidebars_widgets = retrieve_widgets();
$sidebars_widgets['array_version'] = 3;
Expand Down
1 change: 1 addition & 0 deletions src/wp-admin/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@

wp_update_attachment_metadata( $post_id, $newmeta );

// Intentional fall-through to trigger the edit_post() call.
case 'editpost':
check_admin_referer( 'update-post_' . $post_id );

Expand Down
1 change: 1 addition & 0 deletions src/wp-admin/user-edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
exit;
}

// Intentional fall-through to display $errors.
default:
$profileuser = get_user_to_edit( $user_id );

Expand Down
1 change: 1 addition & 0 deletions src/wp-includes/general-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
'<code>url</code>'
)
);
// Intentional fall-through to be handled by the 'url' case.
case 'url':
$output = home_url();
break;
Expand Down

0 comments on commit 83af032

Please sign in to comment.