Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/98120


Change subject: Fixed spacing
......................................................................

Fixed spacing

- Place commas correct
- Moved comments
- Add space after if/foreach/catch
- Reformat some conditions
- Removed trailing spaces

Change-Id: I40ccda72c418c4a33fcd675773cb08d971510cdb
---
M includes/Cookie.php
M includes/Exception.php
M includes/Export.php
M includes/GitInfo.php
M includes/HTMLForm.php
M includes/Html.php
M includes/HttpFunctions.php
M includes/Linker.php
M includes/User.php
M includes/Xml.php
M includes/cache/LocalisationCache.php
M includes/db/Database.php
M includes/media/FormatMetadata.php
M includes/media/XCF.php
M includes/parser/Parser.php
M includes/specials/SpecialExpandTemplates.php
M includes/templates/NoLocalSettings.php
M languages/LanguageConverter.php
M languages/classes/LanguageDsb.php
M languages/classes/LanguageHsb.php
M maintenance/backupTextPass.inc
M maintenance/cdb.php
M maintenance/parse.php
M maintenance/userDupes.inc
M tests/phpunit/data/xmp/gps.result.php
M tests/phpunit/includes/PreferencesTest.php
M tests/phpunit/includes/StatusTest.php
M tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
M tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
M tests/phpunit/includes/specials/SpecialSearchTest.php
30 files changed, 118 insertions(+), 127 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/98120/1

diff --git a/includes/Cookie.php b/includes/Cookie.php
index ecf4667..84050ba 100644
--- a/includes/Cookie.php
+++ b/includes/Cookie.php
@@ -132,7 +132,7 @@
 
                        if ( substr( $domain, 0, 1 ) == '.'
                                && substr_compare( $originDomain, $domain, 
-strlen( $domain ),
-                                                                  strlen( 
$domain ), true ) != 0 ) {
+                                       strlen( $domain ), true ) != 0 ) {
                                return false;
                        }
                }
diff --git a/includes/Exception.php b/includes/Exception.php
index 008be15..4548345 100644
--- a/includes/Exception.php
+++ b/includes/Exception.php
@@ -619,9 +619,9 @@
 
                                if ( $wgShowExceptionDetails ) {
                                        $message .= 'Original exception: ' . 
self::getLogMessage( $e ) .
-                                                "\nBacktrace:\n" . 
self::getRedactedTraceAsString( $e ) .
-                                                "\n\nException caught inside 
exception handler: " . self::getLogMessage( $e2 ) .
-                                                "\nBacktrace:\n" . 
self::getRedactedTraceAsString( $e2 );
+                                               "\nBacktrace:\n" . 
self::getRedactedTraceAsString( $e ) .
+                                               "\n\nException caught inside 
exception handler: " . self::getLogMessage( $e2 ) .
+                                               "\nBacktrace:\n" . 
self::getRedactedTraceAsString( $e2 );
                                } else {
                                        $message .= "Exception caught inside 
exception handler.\n\n" .
                                                "Set \$wgShowExceptionDetails = 
true; at the bottom of LocalSettings.php " .
diff --git a/includes/Export.php b/includes/Export.php
index 3d34763..b4a507d 100644
--- a/includes/Export.php
+++ b/includes/Export.php
@@ -503,7 +503,8 @@
                        'xmlns'              => 
"http://www.mediawiki.org/xml/export-$ver/";,
                        'xmlns:xsi'          => 
"http://www.w3.org/2001/XMLSchema-instance";,
                        'xsi:schemaLocation' => 
"http://www.mediawiki.org/xml/export-$ver/ " .
-                                               
"http://www.mediawiki.org/xml/export-$ver.xsd";, #TODO: how do we get a new 
version up there?
+                               #TODO: how do we get a new version up there?
+                               "http://www.mediawiki.org/xml/export-$ver.xsd";,
                        'version'            => $ver,
                        'xml:lang'           => $wgLanguageCode ),
                        null ) .
diff --git a/includes/GitInfo.php b/includes/GitInfo.php
index f49f9be..e0bd5cd 100644
--- a/includes/GitInfo.php
+++ b/includes/GitInfo.php
@@ -143,8 +143,7 @@
                } else {
                        return (int)$commitDate;
                }
-
-        }
+       }
 
        /**
         * Return the name of the current branch, or HEAD if not found
diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php
index 1680fd6..385663a 100644
--- a/includes/HTMLForm.php
+++ b/includes/HTMLForm.php
@@ -655,8 +655,7 @@
                        . $this->getBody()
                        . $this->getHiddenFields()
                        . $this->getButtons()
-                       . $this->mFooter
-               ;
+                       . $this->mFooter;
 
                $html = $this->wrapForm( $html );
 
diff --git a/includes/Html.php b/includes/Html.php
index 6977a69..0eb6474 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -449,8 +449,8 @@
                        // numbers to be entered in 'type="number"' fields, 
allow
                        // the special case 'step="any"'.
 
-                       if ( in_array( $key, array( 'max', 'min', 'pattern', 
'required' ) ) ||
-                                $key === 'step' && $value !== 'any' ) {
+                       if ( in_array( $key, array( 'max', 'min', 'pattern', 
'required' ) )
+                               || $key === 'step' && $value !== 'any' ) {
                                continue;
                        }
 
diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
index 78c2ac7..da08aa2 100644
--- a/includes/HttpFunctions.php
+++ b/includes/HttpFunctions.php
@@ -842,8 +842,8 @@
                        $this->postData = wfArrayToCgi( $this->postData );
                }
 
-               if ( $this->parsedUrl['scheme'] != 'http' &&
-                        $this->parsedUrl['scheme'] != 'https' ) {
+               if ( $this->parsedUrl['scheme'] != 'http'
+                       && $this->parsedUrl['scheme'] != 'https' ) {
                        $this->status->fatal( 'http-invalid-scheme', 
$this->parsedUrl['scheme'] );
                }
 
diff --git a/includes/Linker.php b/includes/Linker.php
index 895f0f2..52f88fd 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -850,10 +850,10 @@
                if ( $page ) {
                        $url = wfAppendQuery( $url, array( 'page' => $page ) );
                }
-               if ( $manualthumb &&
-                    !isset( $fp['link-title'] ) &&
-                    !isset( $fp['link-url'] ) &&
-                    !isset( $fp['no-link'] ) ) {
+               if ( $manualthumb
+                       && !isset( $fp['link-title'] )
+                       && !isset( $fp['link-url'] )
+                       && !isset( $fp['no-link'] ) ) {
                        $fp['link-url'] = $url;
                }
 
diff --git a/includes/User.php b/includes/User.php
index a01444a..8fcc68c 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1632,8 +1632,8 @@
                $blocked = $this->isBlocked( $bFromSlave );
                $allowUsertalk = ( $wgBlockAllowsUTEdit ? $this->mAllowUsertalk 
: false );
                // If a user's name is suppressed, they cannot make edits 
anywhere
-               if ( !$this->mHideName && $allowUsertalk && $title->getText() 
=== $this->getName() &&
-                 $title->getNamespace() == NS_USER_TALK ) {
+               if ( !$this->mHideName && $allowUsertalk && $title->getText() 
=== $this->getName()
+                       && $title->getNamespace() == NS_USER_TALK ) {
                        $blocked = false;
                        wfDebug( __METHOD__ . ": self-talk page, ignoring any 
blocks\n" );
                }
diff --git a/includes/Xml.php b/includes/Xml.php
index ac0539d..45441fd 100644
--- a/includes/Xml.php
+++ b/includes/Xml.php
@@ -500,34 +500,34 @@
                $options = self::option( $other, 'other', $selected === 'other' 
);
 
                foreach ( explode( "\n", $list ) as $option ) {
-                               $value = trim( $option );
-                               if ( $value == '' ) {
-                                       continue;
-                               } elseif ( substr( $value, 0, 1 ) == '*' && 
substr( $value, 1, 1 ) != '*' ) {
-                                       // A new group is starting ...
-                                       $value = trim( substr( $value, 1 ) );
-                                       if ( $optgroup ) {
-                                               $options .= self::closeElement( 
'optgroup' );
-                                       }
-                                       $options .= self::openElement( 
'optgroup', array( 'label' => $value ) );
-                                       $optgroup = true;
-                               } elseif ( substr( $value, 0, 2 ) == '**' ) {
-                                       // groupmember
-                                       $value = trim( substr( $value, 2 ) );
-                                       $options .= self::option( $value, 
$value, $selected === $value );
-                               } else {
-                                       // groupless reason list
-                                       if ( $optgroup ) {
-                                               $options .= self::closeElement( 
'optgroup' );
-                                       }
-                                       $options .= self::option( $value, 
$value, $selected === $value );
-                                       $optgroup = false;
+                       $value = trim( $option );
+                       if ( $value == '' ) {
+                               continue;
+                       } elseif ( substr( $value, 0, 1 ) == '*' && substr( 
$value, 1, 1 ) != '*' ) {
+                               // A new group is starting ...
+                               $value = trim( substr( $value, 1 ) );
+                               if ( $optgroup ) {
+                                       $options .= self::closeElement( 
'optgroup' );
                                }
+                               $options .= self::openElement( 'optgroup', 
array( 'label' => $value ) );
+                               $optgroup = true;
+                       } elseif ( substr( $value, 0, 2 ) == '**' ) {
+                               // groupmember
+                               $value = trim( substr( $value, 2 ) );
+                               $options .= self::option( $value, $value, 
$selected === $value );
+                       } else {
+                               // groupless reason list
+                               if ( $optgroup ) {
+                                       $options .= self::closeElement( 
'optgroup' );
+                               }
+                               $options .= self::option( $value, $value, 
$selected === $value );
+                               $optgroup = false;
                        }
+               }
 
-                       if ( $optgroup ) {
-                               $options .= self::closeElement( 'optgroup' );
-                       }
+               if ( $optgroup ) {
+                       $options .= self::closeElement( 'optgroup' );
+               }
 
                $attribs = array();
 
diff --git a/includes/cache/LocalisationCache.php 
b/includes/cache/LocalisationCache.php
index f02e0a1..ccb94a2 100644
--- a/includes/cache/LocalisationCache.php
+++ b/includes/cache/LocalisationCache.php
@@ -1197,7 +1197,7 @@
                        if ( file_exists( $fileName ) ) {
                                try {
                                        $this->readers[$code] = 
CdbReader::open( $fileName );
-                               } catch( CdbException $e ) {
+                               } catch ( CdbException $e ) {
                                        wfDebug( __METHOD__ . ": unable to open 
cdb file for reading" );
                                }
                        }
diff --git a/includes/db/Database.php b/includes/db/Database.php
index f70934b..7275bd9 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -1105,7 +1105,7 @@
                        wfDebug( "SQL ERROR (ignored): $error\n" );
                        $this->ignoreErrors( $ignore );
                } else {
-                       $sql1line = mb_substr( str_replace( "\n", "\\n", $sql 
), 0, 5*1024 );
+                       $sql1line = mb_substr( str_replace( "\n", "\\n", $sql 
), 0, 5 * 1024 );
                        wfLogDBError( 
"$fname\t{$this->mServer}\t$errno\t$error\t$sql1line\n" );
                        wfDebug( "SQL ERROR: " . $error . "\n" );
                        throw new DBQueryError( $this, $error, $errno, $sql, 
$fname );
diff --git a/includes/media/FormatMetadata.php 
b/includes/media/FormatMetadata.php
index 390b217..101945e 100644
--- a/includes/media/FormatMetadata.php
+++ b/includes/media/FormatMetadata.php
@@ -1617,13 +1617,10 @@
         * @return mixed value in best language, null if there were no 
languages at all
         * @since 1.23
         */
-       protected function resolveMultilangValue( $value )
-       {
-               if (
-                       !is_array( $value )
+       protected function resolveMultilangValue( $value ) {
+               if ( !is_array( $value )
                        || !isset( $value['_type'] )
-                       || $value['_type'] != 'lang'
-               ) {
+                       || $value['_type'] != 'lang' ) {
                        return $value; // do nothing if not a multilang array
                }
 
diff --git a/includes/media/XCF.php b/includes/media/XCF.php
index e77d384..512cacf 100644
--- a/includes/media/XCF.php
+++ b/includes/media/XCF.php
@@ -103,12 +103,12 @@
                #        (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h)
                try {
                        $header = wfUnpack(
-                                 "A9magic"     # A: space padded
-                               . "/a5version"  # a: zero padded
-                               . "/Nwidth"     # \
-                               . "/Nheight"    # N: unsigned long 32bit big 
endian
-                               . "/Nbase_type" # /
-                       , $binaryHeader
+                               "A9magic" .    # A: space padded
+                               "/a5version" . # a: zero padded
+                               "/Nwidth" .    # \
+                               "/Nheight" .   # N: unsigned long 32bit big 
endian
+                               "/Nbase_type", # /
+                               $binaryHeader
                        );
                } catch ( MWException $mwe ) {
                        return false;
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 2df3160..3479b8f 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1788,14 +1788,14 @@
                        $imagematch = false;
                }
                if ( $this->mOptions->getAllowExternalImages()
-                        || ( $imagesexception && $imagematch ) ) {
+                       || ( $imagesexception && $imagematch ) ) {
                        if ( preg_match( self::EXT_IMAGE_REGEX, $url ) ) {
                                # Image found
                                $text = Linker::makeExternalImage( $url );
                        }
                }
                if ( !$text && $this->mOptions->getEnableImageWhitelist()
-                        && preg_match( self::EXT_IMAGE_REGEX, $url ) ) {
+                       && preg_match( self::EXT_IMAGE_REGEX, $url ) ) {
                        $whitelist = explode( "\n", wfMessage( 
'external_image_whitelist' )->inContentLanguage()->text() );
                        foreach ( $whitelist as $entry ) {
                                # Sanitize the regex fragment, make it 
case-insensitive, ignore blank entries/comments
@@ -3947,11 +3947,10 @@
                $object = false;
                $text = $frame->getArgument( $argName );
                if ( $text === false && $parts->getLength() > 0
-                 && (
-                       $this->ot['html']
-                       || $this->ot['pre']
-                       || ( $this->ot['wiki'] && $frame->isTemplate() )
-                 )
+                       && ( $this->ot['html']
+                               || $this->ot['pre']
+                               || ( $this->ot['wiki'] && $frame->isTemplate() )
+                       )
                ) {
                        # No match in frame, use the supplied default
                        $object = $parts->item( 0 )->getChildren();
@@ -5432,10 +5431,10 @@
                $params['frame']['caption'] = $caption;
 
                # Will the image be presented in a frame, with the caption 
below?
-               $imageIsFramed = isset( $params['frame']['frame'] ) ||
-                                                isset( 
$params['frame']['framed'] ) ||
-                                                isset( 
$params['frame']['thumbnail'] ) ||
-                                                isset( 
$params['frame']['manualthumb'] );
+               $imageIsFramed = isset( $params['frame']['frame'] )
+                       || isset( $params['frame']['framed'] )
+                       || isset( $params['frame']['thumbnail'] )
+                       || isset( $params['frame']['manualthumb'] );
 
                # In the old days, [[Image:Foo|text...]] would set alt text.  
Later it
                # came to also set the caption, ordinary text after the image 
-- which
diff --git a/includes/specials/SpecialExpandTemplates.php 
b/includes/specials/SpecialExpandTemplates.php
index b566b91..a78133c 100644
--- a/includes/specials/SpecialExpandTemplates.php
+++ b/includes/specials/SpecialExpandTemplates.php
@@ -93,7 +93,7 @@
                $out->addWikiMsg( 'expand_templates_intro' );
                $out->addHTML( $this->makeForm( $titleStr, $input ) );
 
-               if( $output !== false ) {
+               if ( $output !== false ) {
                        if ( $this->generateXML && strlen( $output ) > 0 ) {
                                $out->addHTML( $this->makeOutput( $xml, 
'expand_templates_xml_output' ) );
                        }
@@ -108,7 +108,7 @@
                                );
                        }
 
-                       if( ( $wgUseTidy && $options->getTidy() ) || 
$wgAlwaysUseTidy ) {
+                       if ( ( $wgUseTidy && $options->getTidy() ) || 
$wgAlwaysUseTidy ) {
                                $tmp = MWTidy::tidy( $tmp );
                        }
 
@@ -127,7 +127,7 @@
         */
        private function makeForm( $title, $input ) {
                $self = $this->getTitle();
-               $form  = Xml::openElement(
+               $form = Xml::openElement(
                        'form',
                        array( 'method' => 'post', 'action' => 
$self->getLocalUrl() )
                );
diff --git a/includes/templates/NoLocalSettings.php 
b/includes/templates/NoLocalSettings.php
index 0006df4..3f49ed3 100644
--- a/includes/templates/NoLocalSettings.php
+++ b/includes/templates/NoLocalSettings.php
@@ -33,8 +33,8 @@
 $matches = array();
 $ext = 'php';
 $path = '/';
-foreach( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) {
-       if( !preg_match( '/\.(php5?)$/', $part, $matches ) ) {
+foreach ( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) {
+       if ( !preg_match( '/\.(php5?)$/', $part, $matches ) ) {
                $path .= "$part/";
        } else {
                $ext = $matches[1] == 'php5' ? 'php5' : 'php';
diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php
index d4c38af..bb5b348 100644
--- a/languages/LanguageConverter.php
+++ b/languages/LanguageConverter.php
@@ -102,8 +102,7 @@
                        'R' => 'R',       // raw content
                        'D' => 'D',       // convert description (subclass 
implement)
                        '-' => '-',       // remove convert (not implement)
-                       'H' => 'H',       // add rule for convert code
-                                                 // (but no display in placed 
code)
+                       'H' => 'H',       // add rule for convert code (but no 
display in placed code)
                        'N' => 'N'        // current variant name
                );
                $this->mFlags = array_merge( $defaultflags, $flags );
@@ -777,13 +776,12 @@
 
                $ns = NS_MAIN;
 
-               if ( $disableLinkConversion ||
-                        ( !$ignoreOtherCond &&
-                          ( $isredir == 'no'
-                                || $action == 'edit'
-                                || $action == 'submit'
-                                || $linkconvert == 'no'
-                                || $wgUser->getOption( 'noconvertlink' ) == 1 
) ) ) {
+               if ( $disableLinkConversion || ( !$ignoreOtherCond &&
+                               ( $isredir == 'no'
+                                       || $action == 'edit'
+                                       || $action == 'submit'
+                                       || $linkconvert == 'no'
+                                       || $wgUser->getOption( 'noconvertlink' 
) == 1 ) ) ) {
                        return;
                }
 
@@ -876,8 +874,7 @@
                        $this->mTables = $wgLangConvMemc->get( $this->mCacheKey 
);
                        wfProfileOut( __METHOD__ . '-cache' );
                }
-               if ( !$this->mTables
-                        || !array_key_exists( self::CACHE_VERSION_KEY, 
$this->mTables ) ) {
+               if ( !$this->mTables || !array_key_exists( 
self::CACHE_VERSION_KEY, $this->mTables ) ) {
                        wfProfileIn( __METHOD__ . '-recache' );
                        // not in cache, or we need a fresh reload.
                        // We will first load the default tables
@@ -1004,8 +1001,7 @@
                                continue;
                        }
                        $mappings = explode( '}-', $block, 2 );
-                       $stripped = str_replace( array( "'", '"', '*', '#' ), 
'',
-                                                                        
$mappings[0] );
+                       $stripped = str_replace( array( "'", '"', '*', '#' ), 
'', $mappings[0] );
                        $table = StringUtils::explode( ';', $stripped );
                        foreach ( $table as $t ) {
                                $m = explode( '=>', $t, 3 );
@@ -1285,9 +1281,9 @@
                                $from = trim( $u[0] );
                                $v = trim( $u[1] );
                                if ( array_key_exists( $v, $unidtable )
-                                        && !is_array( $unidtable[$v] )
-                                        && $to
-                                        && in_array( $v, $variants ) ) {
+                                       && !is_array( $unidtable[$v] )
+                                       && $to
+                                       && in_array( $v, $variants ) ) {
                                        $unidtable[$v] = array( $from => $to );
                                } elseif ( $to && in_array( $v, $variants ) ) {
                                        $unidtable[$v][$from] = $to;
@@ -1353,8 +1349,7 @@
                                $disp = $disp[0];
                        }
                        // or display frist text under disable manual convert
-                       if ( !$disp
-                                && $this->mConverter->mManualLevel[$variant] 
== 'disable' ) {
+                       if ( !$disp && 
$this->mConverter->mManualLevel[$variant] == 'disable' ) {
                                if ( count( $bidtable ) > 0 ) {
                                        $disp = array_values( $bidtable );
                                        $disp = $disp[0];
@@ -1477,8 +1472,9 @@
                                // then convert <text to convert> to current 
language
                                $this->mRules = $this->mConverter->autoConvert( 
$this->mRules,
                                        $variant );
-                       } else { // if current variant no in flags,
-                                  // then we check its fallback variants.
+                       } else {
+                               // if current variant no in flags,
+                               // then we check its fallback variants.
                                $variantFallbacks =
                                        $this->mConverter->getVariantFallbacks( 
$variant );
                                if ( is_array( $variantFallbacks ) ) {
diff --git a/languages/classes/LanguageDsb.php 
b/languages/classes/LanguageDsb.php
index 975157f..0ae0524 100644
--- a/languages/classes/LanguageDsb.php
+++ b/languages/classes/LanguageDsb.php
@@ -49,7 +49,7 @@
                        case 'lokatiw': # lokatiw
                                $word = 'wo ' . $word;
                                break;
-                       }
+               }
 
                return $word; # this will return the original value for 
'nominatiw' (nominativ) and all undefined case values
        }
diff --git a/languages/classes/LanguageHsb.php 
b/languages/classes/LanguageHsb.php
index 5623f3c..1fc1404 100644
--- a/languages/classes/LanguageHsb.php
+++ b/languages/classes/LanguageHsb.php
@@ -49,7 +49,7 @@
                        case 'lokatiw': # lokatiw
                                $word = 'wo ' . $word;
                                break;
-                       }
+               }
 
                return $word; # this will return the original value for 
'nominatiw' (nominativ) and all undefined case values
        }
diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc
index a51e6ee..f16772c 100644
--- a/maintenance/backupTextPass.inc
+++ b/maintenance/backupTextPass.inc
@@ -417,8 +417,8 @@
                $text = false; // The candidate for a good text. false if no 
proper value.
                $failures = 0; // The number of times, this invocation of 
getText already failed.
 
-               static $consecutiveFailedTextRetrievals = 0; // The number of 
times getText failed without
-                                                            // yielding a good 
text in between.
+               // The number of times getText failed without yielding a good 
text in between.
+               static $consecutiveFailedTextRetrievals = 0;
 
                $this->fetchCount++;
 
diff --git a/maintenance/cdb.php b/maintenance/cdb.php
index 1772b5f..4590611 100644
--- a/maintenance/cdb.php
+++ b/maintenance/cdb.php
@@ -77,7 +77,7 @@
                        print "Loading cdb file $file...";
                        try {
                                $fileHandle = CdbReader::open( $file );
-                       } catch( CdbException $e ) {}
+                       } catch ( CdbException $e ) {}
 
                        if ( !$fileHandle ) {
                                print "not a cdb file or unable to read it\n";
diff --git a/maintenance/parse.php b/maintenance/parse.php
index 3ac7a28..7765784 100644
--- a/maintenance/parse.php
+++ b/maintenance/parse.php
@@ -123,9 +123,9 @@
         */
        protected function parse( $wikitext ) {
                return $this->parser->parse(
-                       $wikitext
-                       , $this->getTitle()
-                       , new ParserOptions()
+                       $wikitext,
+                       $this->getTitle(),
+                       new ParserOptions()
                );
        }
 }
diff --git a/maintenance/userDupes.inc b/maintenance/userDupes.inc
index 8bd80c9..44a1aab 100644
--- a/maintenance/userDupes.inc
+++ b/maintenance/userDupes.inc
@@ -184,7 +184,7 @@
        function getDupes() {
                $user = $this->db->tableName( 'user' );
                $result = $this->db->query(
-                        "SELECT user_name,COUNT(*) AS n
+                       "SELECT user_name,COUNT(*) AS n
                                FROM $user
                        GROUP BY user_name
                          HAVING n > 1", __METHOD__ );
diff --git a/tests/phpunit/data/xmp/gps.result.php 
b/tests/phpunit/data/xmp/gps.result.php
index 8ea9c68..bf7fb21 100644
--- a/tests/phpunit/data/xmp/gps.result.php
+++ b/tests/phpunit/data/xmp/gps.result.php
@@ -7,5 +7,5 @@
                'GPSLatitude' => 88.51805555,
                'GPSLongitude' => -21.12356945,
                'GPSVersionID' => '2.2.0.0'
-        )
+       )
 );
diff --git a/tests/phpunit/includes/PreferencesTest.php 
b/tests/phpunit/includes/PreferencesTest.php
index 3dec2da..5841bb6 100644
--- a/tests/phpunit/includes/PreferencesTest.php
+++ b/tests/phpunit/includes/PreferencesTest.php
@@ -81,9 +81,9 @@
        protected function prefsFor( $user_key ) {
                $preferences = array();
                Preferences::profilePreferences(
-                       $this->prefUsers[$user_key]
-                       , $this->context
-                       , $preferences
+                       $this->prefUsers[$user_key],
+                       $this->context,
+                       $preferences
                );
 
                return $preferences;
diff --git a/tests/phpunit/includes/StatusTest.php 
b/tests/phpunit/includes/StatusTest.php
index 8ed2189..30a554e 100644
--- a/tests/phpunit/includes/StatusTest.php
+++ b/tests/phpunit/includes/StatusTest.php
@@ -413,7 +413,7 @@
         */
        public function testGetErrorMessage() {
                $method = new ReflectionMethod( 'Status', 'getErrorMessage' );
-               $method->setAccessible(true);
+               $method->setAccessible( true );
                $status = new Status();
                $key = 'foo';
                $params = array( 'bar' );
@@ -430,7 +430,7 @@
         */
        public function testGetErrorMessageArray() {
                $method = new ReflectionMethod( 'Status', 
'getErrorMessageArray' );
-               $method->setAccessible(true);
+               $method->setAccessible( true );
                $status = new Status();
                $key = 'foo';
                $params = array( 'bar' );
@@ -446,7 +446,7 @@
 
                $this->assertInternalType( 'array', $messageArray );
                $this->assertCount( 2, $messageArray );
-               foreach( $messageArray as $message ) {
+               foreach ( $messageArray as $message ) {
                        $this->assertInstanceOf( 'Message', $message );
                        $this->assertEquals( $key, $message->getKey() );
                        $this->assertEquals( $params, $message->getParams() );
diff --git a/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php 
b/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
index 54f3598..bcfefde 100644
--- a/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
+++ b/tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
@@ -153,9 +153,9 @@
                if ( isset( $q[$moduleName] ) ) {
                        $print[] = "*$name/[" . implode( ',',
                                array_map( function ( $v ) {
-                                               return $v['title'];
-                                       },
-                                       $q[$moduleName] ) ) . ']';
+                                       return $v['title'];
+                               },
+                               $q[$moduleName] ) ) . ']';
                }
        }
 
diff --git a/tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php 
b/tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
index 398c5a2..531a954 100644
--- a/tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
+++ b/tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php
@@ -33,13 +33,13 @@
                $title->getBacklinkCache()->clear();
                $this->assertEquals( 20, 
$title->getBacklinkCache()->getNumLinks( 'pagelinks' ), 'Correct number of 
backlinks' );
 
-               $job = new RefreshLinksJob( $title, array( 'recursive' => true, 
'table' => 'pagelinks' ) 
+               $job = new RefreshLinksJob( $title, array( 'recursive' => true, 
'table' => 'pagelinks' )
                        + Job::newRootJobParams( 
"refreshlinks:pagelinks:{$title->getPrefixedText()}" ) );
                $extraParams = $job->getRootJobParams();
                $jobs = BacklinkJobUtils::partitionBacklinkJob( $job, 9, 1, 
array( 'params' => $extraParams ) );
 
                $this->assertEquals( 10, count( $jobs ), 'Correct number of 
sub-jobs' );
-               $this->assertEquals( $pages[0], current( 
$jobs[0]->params['pages'] ), 
+               $this->assertEquals( $pages[0], current( 
$jobs[0]->params['pages'] ),
                        'First job is leaf job with proper title' );
                $this->assertEquals( $pages[8], current( 
$jobs[8]->params['pages'] ),
                        'Last leaf job is leaf job with proper title' );
@@ -49,19 +49,19 @@
                        'Last job is recursive sub-job' );
                $this->assertEquals( true, is_array( $jobs[9]->params['range'] 
),
                        'Last job is recursive sub-job' );
-               $this->assertEquals( $title->getPrefixedText(), 
$jobs[0]->getTitle()->getPrefixedText(), 
+               $this->assertEquals( $title->getPrefixedText(), 
$jobs[0]->getTitle()->getPrefixedText(),
                        'Base job title retainend in leaf job' );
-               $this->assertEquals( $title->getPrefixedText(), 
$jobs[9]->getTitle()->getPrefixedText(), 
+               $this->assertEquals( $title->getPrefixedText(), 
$jobs[9]->getTitle()->getPrefixedText(),
                        'Base job title retainend recursive sub-job' );
                $this->assertEquals( $extraParams['rootJobSignature'], 
$jobs[0]->params['rootJobSignature'],
                        'Leaf job has root params' );
-               $this->assertEquals( $extraParams['rootJobSignature'], 
$jobs[9]->params['rootJobSignature'], 
+               $this->assertEquals( $extraParams['rootJobSignature'], 
$jobs[9]->params['rootJobSignature'],
                        'Recursive sub-job has root params' );
 
                $jobs2 = BacklinkJobUtils::partitionBacklinkJob( $jobs[9], 9, 
1, array( 'params' => $extraParams ) );
 
                $this->assertEquals( 10, count( $jobs2 ), 'Correct number of 
sub-jobs' );
-               $this->assertEquals( $pages[9], current( 
$jobs2[0]->params['pages'] ), 
+               $this->assertEquals( $pages[9], current( 
$jobs2[0]->params['pages'] ),
                        'First job is leaf job with proper title' );
                $this->assertEquals( $pages[17], current( 
$jobs2[8]->params['pages'] ),
                        'Last leaf job is leaf job with proper title' );
@@ -73,17 +73,17 @@
                        'Last job is recursive sub-job' );
                $this->assertEquals( $extraParams['rootJobSignature'], 
$jobs2[0]->params['rootJobSignature'],
                        'Leaf job has root params' );
-               $this->assertEquals( $extraParams['rootJobSignature'], 
$jobs2[9]->params['rootJobSignature'], 
+               $this->assertEquals( $extraParams['rootJobSignature'], 
$jobs2[9]->params['rootJobSignature'],
                        'Recursive sub-job has root params' );
 
                $jobs3 = BacklinkJobUtils::partitionBacklinkJob( $jobs2[9], 9, 
1, array( 'params' => $extraParams ) );
 
                $this->assertEquals( 2, count( $jobs3 ), 'Correct number of 
sub-jobs' );
-               $this->assertEquals( $pages[18], current( 
$jobs3[0]->params['pages'] ), 
+               $this->assertEquals( $pages[18], current( 
$jobs3[0]->params['pages'] ),
                        'First job is leaf job with proper title' );
                $this->assertEquals( $extraParams['rootJobSignature'], 
$jobs3[0]->params['rootJobSignature'],
                        'Leaf job has root params' );
-               $this->assertEquals( $pages[19], current( 
$jobs3[1]->params['pages'] ), 
+               $this->assertEquals( $pages[19], current( 
$jobs3[1]->params['pages'] ),
                        'Last job is leaf job with proper title' );
                $this->assertEquals( $extraParams['rootJobSignature'], 
$jobs3[1]->params['rootJobSignature'],
                        'Last leaf job has root params' );
@@ -91,7 +91,7 @@
 
        public static function provider_backlinks() {
                $pages = array();
-               for ( $i=0; $i<20; ++$i ) {
+               for ( $i = 0; $i < 20; ++$i ) {
                        $pages[] = array( 0, "Page-$i" );
                }
                return array(
diff --git a/tests/phpunit/includes/specials/SpecialSearchTest.php 
b/tests/phpunit/includes/specials/SpecialSearchTest.php
index 17e883f..4ccf5d7 100644
--- a/tests/phpunit/includes/specials/SpecialSearchTest.php
+++ b/tests/phpunit/includes/specials/SpecialSearchTest.php
@@ -46,12 +46,12 @@
                        array( /** Expected: */
                                'ProfileName' => $expectedProfile,
                                'Namespaces' => $expectedNS,
-                       )
-                       , array( /** Actual: */
+                       ),
+                       array( /** Actual: */
                                'ProfileName' => $search->getProfile(),
                                'Namespaces' => $search->getNamespaces(),
-                       )
-                       , $message
+                       ),
+                       $message
                );
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40ccda72c418c4a33fcd675773cb08d971510cdb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to