Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace violations.

See #45934.



git-svn-id: https://develop.svn.wordpress.org/trunk@44566 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2019-01-11 06:39:55 +00:00
parent 83af0329a2
commit 33caf61b8b
12 changed files with 33 additions and 34 deletions
+3 -2
View File
@@ -216,8 +216,9 @@ class WP_Locale {
// Set text direction.
if ( isset( $GLOBALS['text_direction'] ) ) {
$this->text_direction = $GLOBALS['text_direction'];
} /* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) {
/* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
} elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) {
$this->text_direction = 'rtl';
}
@@ -389,8 +389,8 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
// Best match of this final is already taken? Must mean this final is a new row.
if ( isset( $orig_matches[ $o ] ) ) {
$final_matches[ $f ] = 'x';
} // Best match of this orig is already taken? Must mean this orig is a deleted row.
elseif ( isset( $final_matches[ $f ] ) ) {
} elseif ( isset( $final_matches[ $f ] ) ) {
// Best match of this orig is already taken? Must mean this orig is a deleted row.
$orig_matches[ $o ] = 'x';
}
}
+2 -2
View File
@@ -2897,8 +2897,8 @@ class wp_xmlrpc_server extends IXR_Server {
// If we found the page then format the data.
if ( $page->ID && ( $page->post_type == 'page' ) ) {
return $this->_prepare_page( $page );
} // If the page doesn't exist indicate that.
else {
} else {
// If the page doesn't exist indicate that.
return new IXR_Error( 404, __( 'Sorry, no such page.' ) );
}
}
+6 -8
View File
@@ -2478,8 +2478,9 @@ function force_balance_tags( $text ) {
if ( $stacksize <= 0 ) {
$tag = '';
// or close to be safe $tag = '/' . $tag;
} // if stacktop value = tag close value then pop
elseif ( $tagstack[ $stacksize - 1 ] == $tag ) { // found closing tag
// if stacktop value = tag close value then pop
} elseif ( $tagstack[ $stacksize - 1 ] == $tag ) { // found closing tag
$tag = '</' . $tag . '>'; // Close Tag
// Pop
array_pop( $tagstack );
@@ -2505,18 +2506,15 @@ function force_balance_tags( $text ) {
// If it's an empty tag "< >", do nothing
if ( '' == $tag ) {
// do nothing
} // ElseIf it presents itself as a self-closing tag...
elseif ( substr( $regex[2], -1 ) == '/' ) {
} elseif ( substr( $regex[2], -1 ) == '/' ) { // ElseIf it presents itself as a self-closing tag...
// ...but it isn't a known single-entity self-closing tag, then don't let it be treated as such and
// immediately close it with a closing tag (the tag will encapsulate no text as a result)
if ( ! in_array( $tag, $single_tags ) ) {
$regex[2] = trim( substr( $regex[2], 0, -1 ) ) . "></$tag";
}
} // ElseIf it's a known single-entity tag but it doesn't close itself, do so
elseif ( in_array( $tag, $single_tags ) ) {
} elseif ( in_array( $tag, $single_tags ) ) { // ElseIf it's a known single-entity tag but it doesn't close itself, do so
$regex[2] .= '/';
} // Else it's not a single-entity tag
else {
} else { // Else it's not a single-entity tag
// If the top of the stack is the same as the tag we want to push, close previous tag
if ( $stacksize > 0 && ! in_array( $tag, $nestable_tags ) && $tagstack[ $stacksize - 1 ] == $tag ) {
$tagqueue = '</' . array_pop( $tagstack ) . '>';
+2 -2
View File
@@ -920,8 +920,8 @@ function get_custom_logo( $blog_id = 0 ) {
esc_url( home_url( '/' ) ),
wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr )
);
} // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview).
elseif ( is_customize_preview() ) {
} elseif ( is_customize_preview() ) {
// If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview).
$html = sprintf(
'<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo"/></a>',
esc_url( home_url( '/' ) )
+3 -3
View File
@@ -68,11 +68,11 @@ function wp_fix_server_vars() {
// Fix for IIS when running with PHP ISAPI
if ( empty( $_SERVER['REQUEST_URI'] ) || ( PHP_SAPI != 'cgi-fcgi' && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {
// IIS Mod-Rewrite
if ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ) {
// IIS Mod-Rewrite
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
} // IIS Isapi_Rewrite
elseif ( isset( $_SERVER['HTTP_X_REWRITE_URL'] ) ) {
} elseif ( isset( $_SERVER['HTTP_X_REWRITE_URL'] ) ) {
// IIS Isapi_Rewrite
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
} else {
// Use ORIG_PATH_INFO if there is no PATH_INFO
+1 -2
View File
@@ -104,8 +104,7 @@ function image_constrain_size_for_editor( $width, $height, $size = 'medium', $co
if ( intval( $content_width ) > 0 && 'edit' === $context ) {
$max_width = min( intval( $content_width ), $max_width );
}
} // $size == 'full' has no constraint
else {
} else { // $size == 'full' has no constraint
$max_width = $width;
$max_height = $height;
}