jenkins-bot has submitted this change and it was merged.

Change subject: Put the "else" (or "elseif") on the same line as the previous 
closing brace
......................................................................


Put the "else" (or "elseif") on the same line as the previous closing brace

Per 
https://www.mediawiki.org/wiki/Manual:Coding_conventions#Indenting_and_alignment

Change-Id: I208981db0a866524156bad18cb687f010afeac2c
---
M includes/CacheHelper.php
M includes/EditPage.php
M includes/MimeMagic.php
M includes/Sanitizer.php
M includes/UserMailer.php
M includes/parser/Preprocessor_DOM.php
M includes/parser/Preprocessor_Hash.php
M includes/resourceloader/ResourceLoaderStartUpModule.php
8 files changed, 34 insertions(+), 53 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/CacheHelper.php b/includes/CacheHelper.php
index f0ae5a3..f6cd3a6 100644
--- a/includes/CacheHelper.php
+++ b/includes/CacheHelper.php
@@ -205,8 +205,7 @@
                                'cachedspecial-viewing-cached-ttl',
                                $context->getLanguage()->formatDuration( 
$this->cacheExpiry )
                        )->escaped();
-               }
-               else {
+               } else {
                        $message = $context->msg(
                                'cachedspecial-viewing-cached-ts'
                        )->escaped();
@@ -277,25 +276,20 @@
 
                                if ( !is_integer( $itemKey ) ) {
                                        wfWarn( "Attempted to get item with 
non-numeric key while the next item in the queue has a key ($itemKey) in " . 
__METHOD__ );
-                               }
-                               elseif ( is_null( $itemKey ) ) {
+                               } elseif ( is_null( $itemKey ) ) {
                                        wfWarn( "Attempted to get an item while 
the queue is empty in " . __METHOD__ );
-                               }
-                               else {
+                               } else {
                                        $value = array_shift( 
$this->cachedChunks );
                                }
-                       }
-                       else {
+                       } else {
                                if ( array_key_exists( $key, 
$this->cachedChunks ) ) {
                                        $value = $this->cachedChunks[$key];
                                        unset( $this->cachedChunks[$key] );
-                               }
-                               else {
+                               } else {
                                        wfWarn( "There is no item with key 
'$key' in this->cachedChunks in " . __METHOD__ );
                                }
                        }
-               }
-               else {
+               } else {
                        if ( !is_array( $args ) ) {
                                $args = array( $args );
                        }
@@ -305,8 +299,7 @@
                        if ( $this->cacheEnabled ) {
                                if ( is_null( $key ) ) {
                                        $this->cachedChunks[] = $value;
-                               }
-                               else {
+                               } else {
                                        $this->cachedChunks[$key] = $value;
                                }
                        }
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 9a27d23..5f5cb53 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -772,8 +772,7 @@
                                $this->sectiontitle = $request->getVal( 
'preloadtitle' );
                                // Once wpSummary isn't being use for setting 
section titles, we should delete this.
                                $this->summary = $request->getVal( 
'preloadtitle' );
-                       }
-                       elseif ( $this->section != 'new' && $request->getVal( 
'summary' ) ) {
+                       } elseif ( $this->section != 'new' && $request->getVal( 
'summary' ) ) {
                                $this->summary = $request->getText( 'summary' );
                                if ( $this->summary !== '' ) {
                                        $this->hasPresetSummary = true;
diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php
index f5c28ab..e3b8577 100644
--- a/includes/MimeMagic.php
+++ b/includes/MimeMagic.php
@@ -508,8 +508,7 @@
                                // trust the file extension
                                $mime = $this->guessTypesForExtension( $ext );
                        }
-               }
-               elseif ( $mime === 'application/x-opc+zip' ) {
+               } elseif ( $mime === 'application/x-opc+zip' ) {
                        if ( $this->isMatchingExtension( $ext, $mime ) ) {
                                // A known file extension for an OPC file,
                                // find the proper mime type for that file 
extension
diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index 90548fe..53bb8fb 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -631,8 +631,7 @@
                                # Remove the comment, leading and trailing
                                # spaces, and leave only one newline.
                                $text = substr_replace( $text, "\n", 
$spaceStart, $spaceLen + 1 );
-                       }
-                       else {
+                       } else {
                                # Remove just the comment.
                                $text = substr_replace( $text, '', $start, $end 
- $start );
                        }
diff --git a/includes/UserMailer.php b/includes/UserMailer.php
index fe80929..4c2ecba 100644
--- a/includes/UserMailer.php
+++ b/includes/UserMailer.php
@@ -262,8 +262,7 @@
                                wfDebug( "PEAR Mail_Mime package is not 
installed. Falling back to text email.\n" );
                                // remove the html body for text email fall back
                                $body = $body['text'];
-                       }
-                       else {
+                       } else {
                                require_once 'Mail/mime.php';
                                if ( wfIsWindows() ) {
                                        $body['text'] = str_replace( "\n", 
"\r\n", $body['text'] );
diff --git a/includes/parser/Preprocessor_DOM.php 
b/includes/parser/Preprocessor_DOM.php
index 6b2a874..0e7d42a 100644
--- a/includes/parser/Preprocessor_DOM.php
+++ b/includes/parser/Preprocessor_DOM.php
@@ -1144,14 +1144,12 @@
                                                || ( $flags & 
PPFrame::STRIP_COMMENTS )
                                        ) {
                                                $out .= '';
-                                       }
-                                       # Add a strip marker in PST mode so 
that pstPass2() can run some old-fashioned regexes on the result
-                                       # Not in RECOVER_COMMENTS mode 
(extractSections) though
-                                       elseif ( $this->parser->ot['wiki'] && 
!( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                       } elseif ( $this->parser->ot['wiki'] && 
!( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                               # Add a strip marker in PST 
mode so that pstPass2() can run some old-fashioned regexes on the result
+                                               # Not in RECOVER_COMMENTS mode 
(extractSections) though
                                                $out .= 
$this->parser->insertStripItem( $contextNode->textContent );
-                                       }
-                                       # Recover the literal comment in 
RECOVER_COMMENTS and pre+no-remove
-                                       else {
+                                       } else {
+                                               # Recover the literal comment 
in RECOVER_COMMENTS and pre+no-remove
                                                $out .= 
$contextNode->textContent;
                                        }
                                } elseif ( $contextNode->nodeName == 'ignore' ) 
{
diff --git a/includes/parser/Preprocessor_Hash.php 
b/includes/parser/Preprocessor_Hash.php
index c2ab54e..53e79d4 100644
--- a/includes/parser/Preprocessor_Hash.php
+++ b/includes/parser/Preprocessor_Hash.php
@@ -440,9 +440,7 @@
                                        $extNode->addChild( 
PPNode_Hash_Tree::newWithText( 'close', $close ) );
                                }
                                $accum->addNode( $extNode );
-                       }
-
-                       elseif ( $found == 'line-start' ) {
+                       } elseif ( $found == 'line-start' ) {
                                // Is this the start of a heading?
                                // Line break belongs before the heading 
element in any case
                                if ( $fakeLineStart ) {
@@ -1065,14 +1063,12 @@
                                                || ( $flags & 
PPFrame::STRIP_COMMENTS )
                                        ) {
                                                $out .= '';
-                                       }
-                                       # Add a strip marker in PST mode so 
that pstPass2() can run some old-fashioned regexes on the result
-                                       # Not in RECOVER_COMMENTS mode 
(extractSections) though
-                                       elseif ( $this->parser->ot['wiki'] && 
!( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                       } elseif ( $this->parser->ot['wiki'] && 
!( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                               # Add a strip marker in PST 
mode so that pstPass2() can run some old-fashioned regexes on the result
+                                               # Not in RECOVER_COMMENTS mode 
(extractSections) though
                                                $out .= 
$this->parser->insertStripItem( $contextNode->firstChild->value );
-                                       }
-                                       # Recover the literal comment in 
RECOVER_COMMENTS and pre+no-remove
-                                       else {
+                                       } else {
+                                               # Recover the literal comment 
in RECOVER_COMMENTS and pre+no-remove
                                                $out .= 
$contextNode->firstChild->value;
                                        }
                                } elseif ( $contextNode->name == 'ignore' ) {
diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php 
b/includes/resourceloader/ResourceLoaderStartUpModule.php
index d34fb5c..9ae7795 100644
--- a/includes/resourceloader/ResourceLoaderStartUpModule.php
+++ b/includes/resourceloader/ResourceLoaderStartUpModule.php
@@ -151,24 +151,22 @@
                        // seem to do that, and custom implementations might 
forget. Coerce it to TS_UNIX
                        $moduleMtime = wfTimestamp( TS_UNIX, 
$module->getModifiedTime( $context ) );
                        $mtime = max( $moduleMtime, wfTimestamp( TS_UNIX, 
$wgCacheEpoch ) );
-                       // Modules without dependencies, a group or a foreign 
source pass two arguments (name, timestamp) to
-                       // mw.loader.register()
+
                        if ( !count( $deps ) && $group === null && $source === 
'local' ) {
+                               // Modules without dependencies, a group or a 
foreign source pass two arguments (name, timestamp) to
+                               // mw.loader.register()
                                $registrations[] = array( $name, $mtime );
-                       }
-                       // Modules with dependencies but no group or foreign 
source pass three arguments
-                       // (name, timestamp, dependencies) to 
mw.loader.register()
-                       elseif ( $group === null && $source === 'local' ) {
+                       } elseif ( $group === null && $source === 'local' ) {
+                               // Modules with dependencies but no group or 
foreign source pass three arguments
+                               // (name, timestamp, dependencies) to 
mw.loader.register()
                                $registrations[] = array( $name, $mtime, $deps 
);
-                       }
-                       // Modules with a group but no foreign source pass four 
arguments (name, timestamp, dependencies, group)
-                       // to mw.loader.register()
-                       elseif ( $source === 'local' ) {
+                       } elseif ( $source === 'local' ) {
+                               // Modules with a group but no foreign source 
pass four arguments (name, timestamp, dependencies, group)
+                               // to mw.loader.register()
                                $registrations[] = array( $name, $mtime, $deps, 
$group );
-                       }
-                       // Modules with a foreign source pass five arguments 
(name, timestamp, dependencies, group, source)
-                       // to mw.loader.register()
-                       else {
+                       } else {
+                               // Modules with a foreign source pass five 
arguments (name, timestamp, dependencies, group, source)
+                               // to mw.loader.register()
                                $registrations[] = array( $name, $mtime, $deps, 
$group, $source );
                        }
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/118764
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I208981db0a866524156bad18cb687f010afeac2c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <coderev...@emsenhuber.ch>
Gerrit-Reviewer: Cscott <canan...@wikimedia.org>
Gerrit-Reviewer: Daniel Friesen <dan...@nadir-seen-fire.com>
Gerrit-Reviewer: IAlex <coderev...@emsenhuber.ch>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to