Umherirrender has uploaded a new change for review.

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


Change subject: Fixed spacing around parenthesis in languages/tests/maintenance
......................................................................

Fixed spacing around parenthesis in languages/tests/maintenance

Change-Id: Idd4299d17f1fcf98ab1d635484cb4e880f35ee24
---
M languages/LanguageConverter.php
M languages/utils/CLDRPluralRuleEvaluator.php
M maintenance/Maintenance.php
M maintenance/cleanupUploadStash.php
M maintenance/convertLinks.php
M maintenance/createAndPromote.php
M maintenance/dumpBackup.php
M maintenance/dumpIterator.php
M maintenance/fetchText.php
M maintenance/fileOpPerfTest.php
M maintenance/generateSitemap.php
M maintenance/install.php
M maintenance/jsparse.php
M maintenance/language/transstat.php
M maintenance/mwdoc-filter.php
M maintenance/oracle/alterSharedConstraints.php
M maintenance/parse.php
M maintenance/proxyCheck.php
M maintenance/rebuildrecentchanges.php
M maintenance/refreshImageMetadata.php
M maintenance/renderDump.php
M maintenance/sql.php
M maintenance/storage/checkStorage.php
M maintenance/storage/compressOld.php
M maintenance/updateSpecialPages.php
M tests/RunSeleniumTests.php
M tests/parser/ParserTestResult.php
M tests/parserTests.php
28 files changed, 63 insertions(+), 63 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/61176/1

diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php
index 512736b..d9227d7 100644
--- a/languages/LanguageConverter.php
+++ b/languages/LanguageConverter.php
@@ -258,7 +258,7 @@
                // Get language variant preference from logged in users
                // Don't call this on stub objects because that causes infinite
                // recursion during initialisation
-               if ( $wgUser->isLoggedIn() )  {
+               if ( $wgUser->isLoggedIn() ) {
                        $ret = $wgUser->getOption( 'variant' );
                } else {
                        // figure out user lang without constructing wgLang to 
avoid
@@ -833,7 +833,7 @@
         * @author Nikola Smolenski <smole...@eunet.rs>
         * @since 1.19
         */
-       public function guessVariant($text, $variant) {
+       public function guessVariant( $text, $variant ) {
                return false;
        }
 
diff --git a/languages/utils/CLDRPluralRuleEvaluator.php 
b/languages/utils/CLDRPluralRuleEvaluator.php
index 1910aaf..43e8aaf 100644
--- a/languages/utils/CLDRPluralRuleEvaluator.php
+++ b/languages/utils/CLDRPluralRuleEvaluator.php
@@ -67,7 +67,7 @@
        public static function evaluateCompiled( $number, array $rules ) {
                // The compiled form is RPN, with tokens strictly delimited by
                // spaces, so this is a simple RPN evaluator.
-               foreach ( $rules as $i => $rule  ) {
+               foreach ( $rules as $i => $rule ) {
                        $stack = array();
                        $zero = ord( '0' );
                        $nine = ord( '9' );
@@ -104,7 +104,7 @@
         */
        private static function doOperation( $token, $left, $right ) {
                if ( in_array( $token, array( 'in', 'not-in', 'within', 
'not-within' ) ) ) {
-                       if ( !($right instanceof CLDRPluralRuleEvaluator_Range 
) ) {
+                       if ( !( $right instanceof CLDRPluralRuleEvaluator_Range 
) ) {
                                $right = new CLDRPluralRuleEvaluator_Range( 
$right );
                        }
                }
diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index d68b831..2162869 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -766,7 +766,7 @@
                $this->output( "\n" );
 
                $scriptDependantParams = $this->mDependantParameters;
-               if ( count($scriptDependantParams) > 0 ) {
+               if ( count( $scriptDependantParams ) > 0 ) {
                        $this->output( "Script dependant parameters:\n" );
                        // Parameters description
                        foreach ( $scriptDependantParams as $par => $info ) {
@@ -791,7 +791,7 @@
                        $this->mGenericParameters,
                        $this->mDependantParameters
                );
-               if ( count($scriptSpecificParams) > 0 ) {
+               if ( count( $scriptSpecificParams ) > 0 ) {
                        $this->output( "Script specific parameters:\n" );
                        // Parameters description
                        foreach ( $scriptSpecificParams as $par => $info ) {
@@ -1077,7 +1077,7 @@
         * @param &$db DatabaseBase object
         */
        private function unlockSearchindex( &$db ) {
-               $db->unlockTables(  __CLASS__ . '::' . __METHOD__ );
+               $db->unlockTables( __CLASS__ . '::' . __METHOD__ );
        }
 
        /**
diff --git a/maintenance/cleanupUploadStash.php 
b/maintenance/cleanupUploadStash.php
index 97dee97..4379b22 100644
--- a/maintenance/cleanupUploadStash.php
+++ b/maintenance/cleanupUploadStash.php
@@ -82,9 +82,9 @@
                                        $stash->getFile( $key, true );
                                        $stash->removeFileNoAuth( $key );
                                } catch ( UploadStashBadPathException $ex ) {
-                                       $this->output( "Failed removing stashed 
upload with key: $key\n"  );
+                                       $this->output( "Failed removing stashed 
upload with key: $key\n" );
                                } catch ( UploadStashZeroLengthFileException 
$ex ) {
-                                       $this->output( "Failed removing stashed 
upload with key: $key\n"  );
+                                       $this->output( "Failed removing stashed 
upload with key: $key\n" );
                                }
                                if ( $i % 100 == 0 ) {
                                        $this->output( "$i\n" );
diff --git a/maintenance/convertLinks.php b/maintenance/convertLinks.php
index 7404b5a..4e0d0b0 100644
--- a/maintenance/convertLinks.php
+++ b/maintenance/convertLinks.php
@@ -80,7 +80,7 @@
 
                # 
--------------------------------------------------------------------
 
-               list ( $cur, $links, $links_temp, $links_backup ) = 
$dbw->tableNamesN( 'cur', 'links', 'links_temp', 'links_backup' );
+               list( $cur, $links, $links_temp, $links_backup ) = 
$dbw->tableNamesN( 'cur', 'links', 'links_temp', 'links_backup' );
 
                if ( $dbw->tableExists( 'pagelinks' ) ) {
                        $this->output( "...have pagelinks; skipping old links 
table updates\n" );
@@ -177,7 +177,7 @@
                                }
                                $dbw->freeResult( $res );
                                # $this->output( "rowOffset: 
$rowOffset\ttuplesAdded: $tuplesAdded\tnumBadLinks: $numBadLinks\n" );
-                               if ( $tuplesAdded != 0  ) {
+                               if ( $tuplesAdded != 0 ) {
                                        if ( $reportLinksConvProgress ) {
                                                $this->output( "Inserting 
$tuplesAdded tuples into $links_temp..." );
                                        }
diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php
index 94a1876..5681d41 100644
--- a/maintenance/createAndPromote.php
+++ b/maintenance/createAndPromote.php
@@ -42,7 +42,7 @@
                        $this->addOption( $role, "Add the account to the 
{$role} group" );
                }
                $this->addArg( "username", "Username of new user" );
-               $this->addArg( "password", "Password to set (not required if 
--force is used)", false);
+               $this->addArg( "password", "Password to set (not required if 
--force is used)", false );
        }
 
        public function execute() {
diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php
index 8c35023..bd7e464 100644
--- a/maintenance/dumpBackup.php
+++ b/maintenance/dumpBackup.php
@@ -45,7 +45,7 @@
        chdir( $olddir );
        if ( $pages === false ) {
                echo( "Unable to open file {$options['pagelist']}\n" );
-               die(1);
+               die( 1 );
        }
        $pages = array_map( 'trim', $pages );
        $dumper->pages = array_filter( $pages, create_function( '$x', 'return 
$x !== "";' ) );
@@ -79,7 +79,7 @@
        $dumper->dump( WikiExporter::STABLE, $textMode );
 } elseif ( isset( $options['logs'] ) ) {
        $dumper->dump( WikiExporter::LOGS );
-} elseif ( isset($options['revrange'] ) ) {
+} elseif ( isset( $options['revrange'] ) ) {
        $dumper->dump( WikiExporter::RANGE, $textMode );
 } else {
        $dumper->progress( <<<ENDS
diff --git a/maintenance/dumpIterator.php b/maintenance/dumpIterator.php
index 2b3417a..3937751 100644
--- a/maintenance/dumpIterator.php
+++ b/maintenance/dumpIterator.php
@@ -81,9 +81,9 @@
                $this->conclusions();
 
                $delta = microtime( true ) - $this->startTime;
-               $this->error( "Done {$this->count} revisions in " . 
round($delta, 2) . " seconds " );
+               $this->error( "Done {$this->count} revisions in " . round( 
$delta, 2 ) . " seconds " );
                if ( $delta > 0 ) {
-                       $this->error( round($this->count / $delta, 2) . " 
pages/sec" );
+                       $this->error( round( $this->count / $delta, 2 ) . " 
pages/sec" );
                }
 
                # Perform the memory_get_peak_usage() when all the other data 
has been output so there's no damage if it dies.
@@ -126,7 +126,7 @@
                        if ( $this->from != $title ) {
                                return;
                        }
-                       $this->output( "Skipped " . ($this->count - 1) . " 
pages\n" );
+                       $this->output( "Skipped " . ( $this->count - 1 ) . " 
pages\n" );
 
                        $this->count = 1;
                        $this->from = null;
diff --git a/maintenance/fetchText.php b/maintenance/fetchText.php
index f166c43..8c46d69 100644
--- a/maintenance/fetchText.php
+++ b/maintenance/fetchText.php
@@ -56,12 +56,12 @@
                        }
                        $textId = intval( $line );
                        $text = $this->doGetText( $db, $textId );
-                       if ($text === false) {
+                       if ( $text === false ) {
                                # actual error, not zero-length text
                                $textLen = "-1";
                        }
                        else {
-                               $textLen = strlen($text);
+                               $textLen = strlen( $text );
                        }
                        $this->output( $textId . "\n" . $textLen . "\n" . $text 
);
                }
diff --git a/maintenance/fileOpPerfTest.php b/maintenance/fileOpPerfTest.php
index 008d768..4be9f21 100644
--- a/maintenance/fileOpPerfTest.php
+++ b/maintenance/fileOpPerfTest.php
@@ -79,7 +79,7 @@
                                $this->output( "Using '$dirname/$file' in 
operations.\n" );
                                $dst = $baseDir . '/' . wfBaseName( $file );
                                $ops1[] = array( 'op' => 'store',
-                                       'src' => "$dirname/$file", 'dst' => 
$dst, 'overwrite' => 1);
+                                       'src' => "$dirname/$file", 'dst' => 
$dst, 'overwrite' => 1 );
                                $ops2[] = array( 'op' => 'copy',
                                        'src' => "$dst", 'dst' => "$dst-1", 
'overwrite' => 1 );
                                $ops3[] = array( 'op' => 'move',
@@ -106,7 +106,7 @@
                $e = ( microtime( true ) - $start ) * 1000;
                if ( $status->getErrorsArray() ) {
                        print_r( $status->getErrorsArray() );
-                       exit(0);
+                       exit( 0 );
                }
                $this->output( $backend->getName() . ": Stored " . count( $ops1 
) . " files in $e ms.\n" );
 
@@ -115,7 +115,7 @@
                $e = ( microtime( true ) - $start ) * 1000;
                if ( $status->getErrorsArray() ) {
                        print_r( $status->getErrorsArray() );
-                       exit(0);
+                       exit( 0 );
                }
                $this->output( $backend->getName() . ": Copied " . count( $ops2 
) . " files in $e ms.\n" );
 
@@ -124,7 +124,7 @@
                $e = ( microtime( true ) - $start ) * 1000;
                if ( $status->getErrorsArray() ) {
                        print_r( $status->getErrorsArray() );
-                       exit(0);
+                       exit( 0 );
                }
                $this->output( $backend->getName() . ": Moved " . count( $ops3 
) . " files in $e ms.\n" );
 
@@ -133,7 +133,7 @@
                $e = ( microtime( true ) - $start ) * 1000;
                if ( $status->getErrorsArray() ) {
                        print_r( $status->getErrorsArray() );
-                       exit(0);
+                       exit( 0 );
                }
                $this->output( $backend->getName() . ": Deleted " . count( 
$ops4 ) . " files in $e ms.\n" );
 
@@ -142,7 +142,7 @@
                $e = ( microtime( true ) - $start ) * 1000;
                if ( $status->getErrorsArray() ) {
                        print_r( $status->getErrorsArray() );
-                       exit(0);
+                       exit( 0 );
                }
                $this->output( $backend->getName() . ": Deleted " . count( 
$ops5 ) . " files in $e ms.\n" );
        }
diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php
index 44867d0..b356d18 100644
--- a/maintenance/generateSitemap.php
+++ b/maintenance/generateSitemap.php
@@ -320,7 +320,7 @@
                        $this->output( "$namespace ($fns)\n" );
                        $skippedRedirects = 0;  // Number of redirects skipped 
for that namespace
                        foreach ( $res as $row ) {
-                               if ($this->skipRedirects && 
$row->page_is_redirect ) {
+                               if ( $this->skipRedirects && 
$row->page_is_redirect ) {
                                        $skippedRedirects++;
                                        continue;
                                }
@@ -357,7 +357,7 @@
                                }
                        }
 
-                       if ($this->skipRedirects && $skippedRedirects > 0) {
+                       if ( $this->skipRedirects && $skippedRedirects > 0 ) {
                                $this->output( "  skipped $skippedRedirects 
redirect(s)\n" );
                        }
 
diff --git a/maintenance/install.php b/maintenance/install.php
index 56f9259..0b1ab5a 100644
--- a/maintenance/install.php
+++ b/maintenance/install.php
@@ -41,7 +41,7 @@
                parent::__construct();
                global $IP;
 
-               $this->addArg( 'name', 'The name of the wiki', true);
+               $this->addArg( 'name', 'The name of the wiki', true );
 
                $this->addArg( 'admin', 'The username of the wiki administrator 
(WikiSysop)', true );
                $this->addOption( 'pass', 'The password for the wiki 
administrator.', false, true );
diff --git a/maintenance/jsparse.php b/maintenance/jsparse.php
index 1a2e121..caffce9 100644
--- a/maintenance/jsparse.php
+++ b/maintenance/jsparse.php
@@ -50,7 +50,7 @@
                        wfSuppressWarnings();
                        $js = file_get_contents( $filename );
                        wfRestoreWarnings();
-                       if ($js === false) {
+                       if ( $js === false ) {
                                $this->output( "$filename ERROR: could not read 
file\n" );
                                $this->errs++;
                                continue;
@@ -58,7 +58,7 @@
 
                        try {
                                $parser->parse( $js, $filename, 1 );
-                       } catch (Exception $e) {
+                       } catch ( Exception $e ) {
                                $this->errs++;
                                $this->output( "$filename ERROR: " . 
$e->getMessage() . "\n" );
                                continue;
@@ -67,8 +67,8 @@
                        $this->output( "$filename OK\n" );
                }
 
-               if ($this->errs > 0) {
-                       exit(1);
+               if ( $this->errs > 0 ) {
+                       exit( 1 );
                }
        }
 }
diff --git a/maintenance/language/transstat.php 
b/maintenance/language/transstat.php
index ba50322..4eab666 100644
--- a/maintenance/language/transstat.php
+++ b/maintenance/language/transstat.php
@@ -96,7 +96,7 @@
 
 foreach ( $wgLanguages->getLanguages() as $code ) {
        # Don't check English, RTL English or dummy language codes
-       if ( $code == 'en' || $code == 'enRTL' || (is_array( 
$wgDummyLanguageCodes ) &&
+       if ( $code == 'en' || $code == 'enRTL' || ( is_array( 
$wgDummyLanguageCodes ) &&
                isset( $wgDummyLanguageCodes[$code] ) ) ) {
                continue;
        }
diff --git a/maintenance/mwdoc-filter.php b/maintenance/mwdoc-filter.php
index 6eeb48d..c80981b 100644
--- a/maintenance/mwdoc-filter.php
+++ b/maintenance/mwdoc-filter.php
@@ -18,6 +18,6 @@
 $source = file_get_contents( $argv[1] );
 $regexp = 
'#\@var\s+([^\s]+)([^/]+)/\s+(var|public|protected|private)\s+(\$[^\s;=]+)#';
 $replac = '${2} */ ${3} ${1} ${4}';
-$source = preg_replace($regexp, $replac, $source);
+$source = preg_replace( $regexp, $replac, $source );
 
 echo $source;
diff --git a/maintenance/oracle/alterSharedConstraints.php 
b/maintenance/oracle/alterSharedConstraints.php
index 47f5ff7..8f16597 100644
--- a/maintenance/oracle/alterSharedConstraints.php
+++ b/maintenance/oracle/alterSharedConstraints.php
@@ -49,7 +49,7 @@
 
                $dbw = wfGetDB( DB_MASTER );
                foreach ( $wgSharedTables as $table ) {
-                       $stable = $dbw->tableNameInternal($table);
+                       $stable = $dbw->tableNameInternal( $table );
                        if ( $wgSharedPrefix != null ) {
                                $ltable = preg_replace( 
"/^$wgSharedPrefix(.*)/i", "$wgDBprefix\\1", $stable );
                        } else {
@@ -62,14 +62,14 @@
                                           AND ucc.constraint_name = 
uc.constraint_name
                                           AND uccpk.constraint_name = 
uc.r_constraint_name
                                           AND uccpk.table_name = '$ltable'" );
-                       while (($row = $result->fetchRow()) !== false) {
+                       while ( ( $row = $result->fetchRow() ) !== false ) {
 
-                                       $this->output( "Altering 
{$row['constraint_name']} ...");
+                                       $this->output( "Altering 
{$row['constraint_name']} ..." );
 
                                        try {
                                                $dbw->query( "ALTER TABLE 
{$row['table_name']} DROP CONSTRAINT {$wgDBprefix}{$row['constraint_name']}" );
-                                       } catch (DBQueryError $exdb) {
-                                               if ($exdb->errno != 2443) {
+                                       } catch ( DBQueryError $exdb ) {
+                                               if ( $exdb->errno != 2443 ) {
                                                        throw $exdb;
                                                }
                                        }
diff --git a/maintenance/parse.php b/maintenance/parse.php
index 14976c9..d017c0e 100644
--- a/maintenance/parse.php
+++ b/maintenance/parse.php
@@ -90,7 +90,7 @@
 
                if ( $input_file === $php_stdin ) {
                        $ctrl = wfIsWindows() ? 'CTRL+Z' : 'CTRL+D';
-                       $this->error( basename(__FILE__) . ": warning: reading 
wikitext from STDIN. Press $ctrl to parse.\n" );
+                       $this->error( basename( __FILE__ ) . ": warning: 
reading wikitext from STDIN. Press $ctrl to parse.\n" );
                }
 
                return file_get_contents( $input_file );
diff --git a/maintenance/proxyCheck.php b/maintenance/proxyCheck.php
index c408dcb..b52f20f 100644
--- a/maintenance/proxyCheck.php
+++ b/maintenance/proxyCheck.php
@@ -46,8 +46,8 @@
        $output = "Connecting to $ip:$port, target $url, this hostname $host\n";
 
        # Open socket
-       $sock = @fsockopen($ip, $port, $errno, $errstr, 5);
-       if ($errno == 0 ) {
+       $sock = @fsockopen( $ip, $port, $errno, $errstr, 5 );
+       if ( $errno == 0 ) {
                $output .= "Connected\n";
                # Send payload
                $request = "GET $url HTTP/1.0\r\n";
@@ -56,10 +56,10 @@
 #              $request .= "Host: ".$url."\r\n";
 #              $request .= "User-Agent: MediaWiki open proxy check\r\n";
                $request .= "\r\n";
-               @fputs($sock, $request);
-               $response = fgets($sock, 65536);
+               @fputs( $sock, $request );
+               $response = fgets( $sock, 65536 );
                $output .= $response;
-               @fclose($sock);
+               @fclose( $sock );
        } else {
                $output .= "No connection\n";
        }
diff --git a/maintenance/rebuildrecentchanges.php 
b/maintenance/rebuildrecentchanges.php
index 6609531..9ca6ab6 100644
--- a/maintenance/rebuildrecentchanges.php
+++ b/maintenance/rebuildrecentchanges.php
@@ -99,7 +99,7 @@
         */
        private function rebuildRecentChangesTablePass2() {
                $dbw = wfGetDB( DB_MASTER );
-               list ( $recentchanges, $revision ) = $dbw->tableNamesN( 
'recentchanges', 'revision' );
+               list( $recentchanges, $revision ) = $dbw->tableNamesN( 
'recentchanges', 'revision' );
 
                $this->output( "Updating links and size differences...\n" );
 
diff --git a/maintenance/refreshImageMetadata.php 
b/maintenance/refreshImageMetadata.php
index a53548d..a1e7b18 100644
--- a/maintenance/refreshImageMetadata.php
+++ b/maintenance/refreshImageMetadata.php
@@ -99,7 +99,7 @@
 
                        if ( $res->numRows() > 0 ) {
                                $row1 = $res->current();
-                               $this->output( "Processing next 
{$this->mBatchSize} rows starting with {$row1->img_name}.\n");
+                               $this->output( "Processing next 
{$this->mBatchSize} rows starting with {$row1->img_name}.\n" );
                                $res->rewind();
                        } else {
                                $this->error( "No images to process.", 4 );
@@ -123,7 +123,7 @@
                                                $this->output( "Warning: 
File:{$row->img_name} used to have " .
                                                "$oldLength bytes of metadata 
but now has $newLength bytes.\n" );
                                        } elseif ( $verbose ) {
-                                               $this->output("Refreshed 
File:{$row->img_name}.\n" );
+                                               $this->output( "Refreshed 
File:{$row->img_name}.\n" );
                                        }
                                } else {
                                        $leftAlone++;
@@ -138,7 +138,7 @@
 
                                                }
                                                if ( $verbose ) {
-                                                       $this->output("Forcibly 
refreshed File:{$row->img_name}.\n" );
+                                                       $this->output( 
"Forcibly refreshed File:{$row->img_name}.\n" );
                                                }
                                        }
                                        else {
diff --git a/maintenance/renderDump.php b/maintenance/renderDump.php
index 3938915..2039a21 100644
--- a/maintenance/renderDump.php
+++ b/maintenance/renderDump.php
@@ -69,9 +69,9 @@
                $importer->doImport();
 
                $delta = microtime( true ) - $this->startTime;
-               $this->error( "Rendered {$this->count} pages in " . 
round($delta, 2) . " seconds " );
+               $this->error( "Rendered {$this->count} pages in " . round( 
$delta, 2 ) . " seconds " );
                if ( $delta > 0 ) {
-                       $this->error( round($this->count / $delta, 2) . " 
pages/sec" );
+                       $this->error( round( $this->count / $delta, 2 ) . " 
pages/sec" );
                }
                $this->error( "\n" );
        }
diff --git a/maintenance/sql.php b/maintenance/sql.php
index b10a379..66de5b1 100644
--- a/maintenance/sql.php
+++ b/maintenance/sql.php
@@ -91,7 +91,7 @@
                                readline_add_history( $wholeLine . 
$dbw->getDelimiter() );
                                readline_write_history( $historyFile );
                        }
-                       try{
+                       try {
                                $res = $dbw->query( $wholeLine );
                                $this->sqlPrintResult( $res, $dbw );
                                $prompt = $newPrompt;
diff --git a/maintenance/storage/checkStorage.php 
b/maintenance/storage/checkStorage.php
index 505313d..632e04a 100644
--- a/maintenance/storage/checkStorage.php
+++ b/maintenance/storage/checkStorage.php
@@ -462,7 +462,7 @@
                        return;
                }
 
-               if ( !$id )  {
+               if ( !$id ) {
                        // No ID, can't import
                        echo "No id tag in revision, can't import\n";
                        return;
diff --git a/maintenance/storage/compressOld.php 
b/maintenance/storage/compressOld.php
index b766fe9..a3a2a4c 100644
--- a/maintenance/storage/compressOld.php
+++ b/maintenance/storage/compressOld.php
@@ -223,7 +223,7 @@
                        }
                        $conds[] = "rev_timestamp>'" . $beginDate . "'";
                }
-               if ( $endDate )  {
+               if ( $endDate ) {
                        if ( !preg_match( '/^\d{14}$/', $endDate ) ) {
                                $this->error( "Invalid end date \"$endDate\"\n" 
);
                                return false;
@@ -282,7 +282,7 @@
                                $revs[] = $revRow;
                        }
 
-                       if ( count( $revs ) < 2) {
+                       if ( count( $revs ) < 2 ) {
                                # No revisions matching, no further processing
                                $this->output( "\n" );
                                continue;
@@ -351,12 +351,12 @@
                                        if ( $extdb != "" ) {
                                                # Move blob objects to External 
Storage
                                                $stored = $storeObj->store( 
$extdb, serialize( $chunk ));
-                                               if ($stored === false) {
+                                               if ( $stored === false ) {
                                                        $this->error( "Unable 
to store object" );
                                                        return false;
                                                }
                                                # Store External Storage URLs 
instead of Stub placeholders
-                                               foreach ($stubs as $stub) {
+                                               foreach ( $stubs as $stub ) {
                                                        if ( $stub === false ) {
                                                                continue;
                                                        }
@@ -388,7 +388,7 @@
                                                        if ( $stubs[$j] !== 
false && $revs[$i + $j]->rev_text_id != $primaryOldid ) {
                                                                $dbw->update( 
'text',
                                                                        array( 
/* SET */
-                                                                               
'old_text' => serialize($stubs[$j]),
+                                                                               
'old_text' => serialize( $stubs[$j] ),
                                                                                
'old_flags' => 'object,utf-8',
                                                                        ), 
array( /* WHERE */
                                                                                
'old_id' => $revs[$i + $j]->rev_text_id
diff --git a/maintenance/updateSpecialPages.php 
b/maintenance/updateSpecialPages.php
index 9c21bb5..90a0cd0 100644
--- a/maintenance/updateSpecialPages.php
+++ b/maintenance/updateSpecialPages.php
@@ -124,7 +124,7 @@
                                                $this->output( sprintf( 
"%.2fs\n", $seconds ) );
                                        }
                                        # Reopen any connections that have 
closed
-                                       if ( !wfGetLB()->pingAll() )  {
+                                       if ( !wfGetLB()->pingAll() ) {
                                                $this->output( "\n" );
                                                do {
                                                        $this->error( 
"Connection failed, reconnecting in 10 seconds..." );
diff --git a/tests/RunSeleniumTests.php b/tests/RunSeleniumTests.php
index 964b7d6..976831e 100644
--- a/tests/RunSeleniumTests.php
+++ b/tests/RunSeleniumTests.php
@@ -85,7 +85,7 @@
 
        protected function startServer() {
                if ( $this->seleniumServerExecPath == '' ) {
-                       die ( "The selenium server exec path is not set in " .
+                       die( "The selenium server exec path is not set in " .
                                "selenium_settings.ini. Cannot start server \n" 
.
                                "as requested - terminating RunSeleniumTests\n" 
);
                }
@@ -96,7 +96,7 @@
                        case 'started':
                                break;
                        case 'failed':
-                               die ( "Unable to start the Selenium Server - " .
+                               die( "Unable to start the Selenium Server - " .
                                        "terminating RunSeleniumTests\n" );
                        case 'running':
                                echo ( "Warning: The Selenium Server is " .
diff --git a/tests/parser/ParserTestResult.php 
b/tests/parser/ParserTestResult.php
index e846da5..d9ad773 100644
--- a/tests/parser/ParserTestResult.php
+++ b/tests/parser/ParserTestResult.php
@@ -37,6 +37,6 @@
 
        /** Whether the test passed */
        public function isSuccess() {
-               return ($this->expected === $this->actual);
+               return $this->expected === $this->actual;
        }
 }
diff --git a/tests/parserTests.php b/tests/parserTests.php
index 804a30c..2e5cd53 100644
--- a/tests/parserTests.php
+++ b/tests/parserTests.php
@@ -90,5 +90,5 @@
        $tester->fuzzTest( $files );
 } else {
        $ok = $tester->runTestsFromFiles( $files );
-       exit ( $ok ? 0 : 1 );
+       exit( $ok ? 0 : 1 );
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd4299d17f1fcf98ab1d635484cb4e880f35ee24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

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

Reply via email to