jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/371474 )

Change subject: update mediawiki-codesniffer to 0.11.0 and fix issues
......................................................................


update mediawiki-codesniffer to 0.11.0 and fix issues

- mostly auto fixes
- some too long lines fixed
- ignore amp space in one case  passing by reference

Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
---
M composer.json
M includes/Block.php
M includes/DefaultSettings.php
M includes/EditPage.php
M includes/MovePage.php
M includes/RevisionList.php
M includes/Sanitizer.php
M includes/api/ApiCSPReport.php
M includes/api/ApiQueryImageInfo.php
M includes/api/ApiQueryWatchlist.php
M includes/api/SearchApi.php
M includes/changes/ChangesListFilterGroup.php
M includes/changes/OldChangesList.php
M includes/filebackend/filejournal/DBFileJournal.php
M includes/installer/Installer.php
M includes/libs/composer/ComposerInstalled.php
M includes/libs/composer/ComposerLock.php
M includes/parser/Parser.php
M includes/parser/ParserOptions.php
M includes/parser/Preprocessor_DOM.php
M includes/parser/Preprocessor_Hash.php
M includes/profiler/SectionProfiler.php
M includes/search/SearchEngine.php
M includes/search/SearchSqlite.php
M includes/site/Site.php
M includes/specialpage/LoginSignupSpecialPage.php
M includes/specials/SpecialExport.php
M includes/specials/SpecialMediaStatistics.php
M includes/specials/SpecialRevisiondelete.php
M includes/specials/SpecialWatchlist.php
M includes/specials/helpers/LoginHelper.php
M includes/specials/pagers/UsersPager.php
M includes/tidy/Balancer.php
M includes/widget/search/InterwikiSearchResultSetWidget.php
M includes/widget/search/InterwikiSearchResultWidget.php
M languages/Language.php
M languages/classes/LanguageKk.php
M languages/classes/LanguageSr.php
M languages/messages/MessagesKm.php
M maintenance/hhvm/makeRepo.php
M maintenance/refreshLinks.php
M tests/phpunit/MediaWikiTestCase.php
M tests/phpunit/includes/changes/ChangesListFilterTest.php
M tests/phpunit/includes/config/EtcdConfigTest.php
M tests/phpunit/includes/interwiki/ClassicInterwikiLookupTest.php
M tests/phpunit/mocks/media/MockOggHandler.php
M tests/qunit/data/load.mock.php
47 files changed, 86 insertions(+), 81 deletions(-)

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



diff --git a/composer.json b/composer.json
index bc48360..32933e6 100644
--- a/composer.json
+++ b/composer.json
@@ -53,7 +53,7 @@
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "jetbrains/phpstorm-stubs": 
"dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a",
                "justinrainbow/json-schema": "~5.2",
-               "mediawiki/mediawiki-codesniffer": "0.10.1",
+               "mediawiki/mediawiki-codesniffer": "0.11.0",
                "monolog/monolog": "~1.22.1",
                "nikic/php-parser": "2.1.0",
                "nmred/kafka-php": "0.1.5",
diff --git a/includes/Block.php b/includes/Block.php
index 8fc2686..843ea54 100644
--- a/includes/Block.php
+++ b/includes/Block.php
@@ -1501,7 +1501,7 @@
                        return $id;
                }
                $hmac = MWCryptHash::hmac( $id, $secretKey, false );
-               $cookieValue =  $id . '!' . $hmac;
+               $cookieValue = $id . '!' . $hmac;
                return $cookieValue;
        }
 
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index a28aa5b..ba755fa 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5797,7 +5797,7 @@
        // Long term limit. We need to balance the risk
        // of somebody using this as a DoS attack to lock someone
        // out of their account, and someone doing a brute force attack.
-       [ 'count' => 150, 'seconds' => 60*60*48 ],
+       [ 'count' => 150, 'seconds' => 60 * 60 * 48 ],
 ];
 
 /**
diff --git a/includes/EditPage.php b/includes/EditPage.php
index cc27e88..49341c5 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4333,7 +4333,7 @@
                $newPage = !$this->mTitle->exists();
 
                if ( $labelAsPublish ) {
-                       $buttonLabelKey =  $newPage ? 'publishpage' : 
'publishchanges';
+                       $buttonLabelKey = $newPage ? 'publishpage' : 
'publishchanges';
                } else {
                        $buttonLabelKey = $newPage ? 'savearticle' : 
'savechanges';
                }
diff --git a/includes/MovePage.php b/includes/MovePage.php
index 8d0c33dc..39dc642 100644
--- a/includes/MovePage.php
+++ b/includes/MovePage.php
@@ -511,7 +511,7 @@
                $logEntry->setComment( $reason );
                $logEntry->setParameters( [
                        '4::target' => $nt->getPrefixedText(),
-                       '5::noredir' => $redirectContent ? '0': '1',
+                       '5::noredir' => $redirectContent ? '0' : '1',
                ] );
 
                $formatter = LogFormatter::newFromEntry( $logEntry );
diff --git a/includes/RevisionList.php b/includes/RevisionList.php
index ccdedb8..b0bc60a 100644
--- a/includes/RevisionList.php
+++ b/includes/RevisionList.php
@@ -116,7 +116,7 @@
        }
 
        public function key() {
-               return $this->res ? $this->res->key(): 0;
+               return $this->res ? $this->res->key() : 0;
        }
 
        public function valid() {
diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index b6b7922..ed09701 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -1677,7 +1677,10 @@
                $text = preg_replace_callback(
                        self::CHAR_REFS_REGEX,
                        [ 'Sanitizer', 'decodeCharReferencesCallback' ],
-                       $text, /* limit */ -1, $count );
+                       $text,
+                       -1, //limit
+                       $count
+               );
 
                if ( $count ) {
                        return $wgContLang->normalize( $text );
diff --git a/includes/api/ApiCSPReport.php b/includes/api/ApiCSPReport.php
index 3a78c13..9ad24c1 100644
--- a/includes/api/ApiCSPReport.php
+++ b/includes/api/ApiCSPReport.php
@@ -115,7 +115,7 @@
                $req = $this->getRequest();
                $contentType = $req->getHeader( 'content-type' );
                if ( $contentType !== 'application/json'
-                       && $contentType !=='application/csp-report'
+                       && $contentType !== 'application/csp-report'
                ) {
                        $this->error( 'wrongformat', __METHOD__ );
                }
diff --git a/includes/api/ApiQueryImageInfo.php 
b/includes/api/ApiQueryImageInfo.php
index bfd5b17..7b0080e 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -767,30 +767,30 @@
         */
        private static function getProperties( $modulePrefix = '' ) {
                return [
-                       'timestamp' =>      ' timestamp     - Adds timestamp 
for the uploaded version',
-                       'user' =>           ' user          - Adds the user who 
uploaded the image version',
-                       'userid' =>         ' userid        - Add the user ID 
that uploaded the image version',
-                       'comment' =>        ' comment       - Comment on the 
version',
-                       'parsedcomment' =>  ' parsedcomment - Parse the comment 
on the version',
+                       'timestamp' => ' timestamp     - Adds timestamp for the 
uploaded version',
+                       'user' => ' user          - Adds the user who uploaded 
the image version',
+                       'userid' => ' userid        - Add the user ID that 
uploaded the image version',
+                       'comment' => ' comment       - Comment on the version',
+                       'parsedcomment' => ' parsedcomment - Parse the comment 
on the version',
                        'canonicaltitle' => ' canonicaltitle - Adds the 
canonical title of the image file',
-                       'url' =>            ' url           - Gives URL to the 
image and the description page',
-                       'size' =>           ' size          - Adds the size of 
the image in bytes, ' .
+                       'url' => ' url           - Gives URL to the image and 
the description page',
+                       'size' => ' size          - Adds the size of the image 
in bytes, ' .
                                'its height and its width. Page count and 
duration are added if applicable',
-                       'dimensions' =>     ' dimensions    - Alias for size', 
// B/C with Allimages
-                       'sha1' =>           ' sha1          - Adds SHA-1 hash 
for the image',
-                       'mime' =>           ' mime          - Adds MIME type of 
the image',
-                       'thumbmime' =>      ' thumbmime     - Adds MIME type of 
the image thumbnail' .
+                       'dimensions' => ' dimensions    - Alias for size', // 
B/C with Allimages
+                       'sha1' => ' sha1          - Adds SHA-1 hash for the 
image',
+                       'mime' => ' mime          - Adds MIME type of the 
image',
+                       'thumbmime' => ' thumbmime     - Adds MIME type of the 
image thumbnail' .
                                ' (requires url and param ' . $modulePrefix . 
'urlwidth)',
-                       'mediatype' =>      ' mediatype     - Adds the media 
type of the image',
-                       'metadata' =>       ' metadata      - Lists Exif 
metadata for the version of the image',
+                       'mediatype' => ' mediatype     - Adds the media type of 
the image',
+                       'metadata' => ' metadata      - Lists Exif metadata for 
the version of the image',
                        'commonmetadata' => ' commonmetadata - Lists file 
format generic metadata ' .
                                'for the version of the image',
-                       'extmetadata' =>    ' extmetadata   - Lists formatted 
metadata combined ' .
+                       'extmetadata' => ' extmetadata   - Lists formatted 
metadata combined ' .
                                'from multiple sources. Results are HTML 
formatted.',
-                       'archivename' =>    ' archivename   - Adds the file 
name of the archive ' .
+                       'archivename' => ' archivename   - Adds the file name 
of the archive ' .
                                'version for non-latest versions',
-                       'bitdepth' =>       ' bitdepth      - Adds the bit 
depth of the version',
-                       'uploadwarning' =>  ' uploadwarning - Used by the 
Special:Upload page to ' .
+                       'bitdepth' => ' bitdepth      - Adds the bit depth of 
the version',
+                       'uploadwarning' => ' uploadwarning - Used by the 
Special:Upload page to ' .
                                'get information about an existing file. Not 
intended for use outside MediaWiki core',
                ];
        }
diff --git a/includes/api/ApiQueryWatchlist.php 
b/includes/api/ApiQueryWatchlist.php
index f8f6e7d..9883480 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -179,7 +179,7 @@
                $watchedItemQuery = 
MediaWikiServices::getInstance()->getWatchedItemQueryService();
                $items = 
$watchedItemQuery->getWatchedItemsWithRecentChangeInfo( $wlowner, $options, 
$startFrom );
 
-               foreach ( $items as list ( $watchedItem, $recentChangeInfo ) ) {
+               foreach ( $items as list( $watchedItem, $recentChangeInfo ) ) {
                        /** @var WatchedItem $watchedItem */
                        if ( is_null( $resultPageSet ) ) {
                                $vals = $this->extractOutputData( $watchedItem, 
$recentChangeInfo );
diff --git a/includes/api/SearchApi.php b/includes/api/SearchApi.php
index 552292b..f7c6471 100644
--- a/includes/api/SearchApi.php
+++ b/includes/api/SearchApi.php
@@ -115,7 +115,7 @@
                        $defaultProfile = null;
                        foreach ( $profiles as $profile ) {
                                $types[] = $profile['name'];
-                               if ( isset ( $profile['desc-message'] ) ) {
+                               if ( isset( $profile['desc-message'] ) ) {
                                        $helpMessages[$profile['name']] = 
$profile['desc-message'];
                                }
                                if ( !empty( $profile['default'] ) ) {
diff --git a/includes/changes/ChangesListFilterGroup.php 
b/includes/changes/ChangesListFilterGroup.php
index 0dc1145..5762752 100644
--- a/includes/changes/ChangesListFilterGroup.php
+++ b/includes/changes/ChangesListFilterGroup.php
@@ -165,7 +165,7 @@
                        $this->title = $groupDefinition['title'];
                }
 
-               if ( isset ( $groupDefinition['whatsThisHeader'] ) ) {
+               if ( isset( $groupDefinition['whatsThisHeader'] ) ) {
                        $this->whatsThisHeader = 
$groupDefinition['whatsThisHeader'];
                        $this->whatsThisBody = 
$groupDefinition['whatsThisBody'];
                        $this->whatsThisUrl = $groupDefinition['whatsThisUrl'];
@@ -352,7 +352,7 @@
                        'messageKeys' => [ $this->title ]
                ];
 
-               if ( isset ( $this->whatsThisHeader ) ) {
+               if ( isset( $this->whatsThisHeader ) ) {
                        $output['whatsThisHeader'] = $this->whatsThisHeader;
                        $output['whatsThisBody'] = $this->whatsThisBody;
                        $output['whatsThisUrl'] = $this->whatsThisUrl;
diff --git a/includes/changes/OldChangesList.php 
b/includes/changes/OldChangesList.php
index 4c4fb7e..4d6187b 100644
--- a/includes/changes/OldChangesList.php
+++ b/includes/changes/OldChangesList.php
@@ -82,7 +82,7 @@
                if ( $rc->mAttribs['rc_log_type'] ) {
                        $logtitle = SpecialPage::getTitleFor( 'Log', 
$rc->mAttribs['rc_log_type'] );
                        $this->insertLog( $html, $logtitle, 
$rc->mAttribs['rc_log_type'] );
-                       $flags = $this->recentChangesFlags( [ 'unpatrolled' 
=>$unpatrolled,
+                       $flags = $this->recentChangesFlags( [ 'unpatrolled' => 
$unpatrolled,
                                'bot' => $rc->mAttribs['rc_bot'] ], '' );
                        if ( $flags !== '' ) {
                                $html .= ' ' . $flags;
diff --git a/includes/filebackend/filejournal/DBFileJournal.php 
b/includes/filebackend/filejournal/DBFileJournal.php
index 42b36ff..4269f91 100644
--- a/includes/filebackend/filejournal/DBFileJournal.php
+++ b/includes/filebackend/filejournal/DBFileJournal.php
@@ -183,7 +183,7 @@
        protected function getMasterDB() {
                if ( !$this->dbw ) {
                        // Get a separate connection in autocommit mode
-                       $lb =  
MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->newMainLB();
+                       $lb = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->newMainLB();
                        $this->dbw = $lb->getConnection( DB_MASTER, [], 
$this->wiki );
                        $this->dbw->clearFlag( DBO_TRX );
                }
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index a29d987..46aa518 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -1353,7 +1353,7 @@
                }
 
                // extensions -> extension.json, skins -> skin.json
-               $jsonFile = substr( $directory, 0, strlen( $directory ) -1 ) . 
'.json';
+               $jsonFile = substr( $directory, 0, strlen( $directory ) - 1 ) . 
'.json';
 
                $dh = opendir( $extDir );
                $exts = [];
diff --git a/includes/libs/composer/ComposerInstalled.php 
b/includes/libs/composer/ComposerInstalled.php
index 9f15078..ef2b768 100644
--- a/includes/libs/composer/ComposerInstalled.php
+++ b/includes/libs/composer/ComposerInstalled.php
@@ -28,7 +28,7 @@
                                'type' => $installed['type'],
                                'licenses' => isset( $installed['license'] ) ? 
$installed['license'] : [],
                                'authors' => isset( $installed['authors'] ) ? 
$installed['authors'] : [],
-                               'description' => isset( 
$installed['description'] ) ? $installed['description']: '',
+                               'description' => isset( 
$installed['description'] ) ? $installed['description'] : '',
                        ];
                }
 
diff --git a/includes/libs/composer/ComposerLock.php 
b/includes/libs/composer/ComposerLock.php
index 818ccdf..dc8bc03 100644
--- a/includes/libs/composer/ComposerLock.php
+++ b/includes/libs/composer/ComposerLock.php
@@ -28,7 +28,7 @@
                                'type' => $installed['type'],
                                'licenses' => isset( $installed['license'] ) ? 
$installed['license'] : [],
                                'authors' => isset( $installed['authors'] ) ? 
$installed['authors'] : [],
-                               'description' => isset( 
$installed['description'] ) ? $installed['description']: '',
+                               'description' => isset( 
$installed['description'] ) ? $installed['description'] : '',
                        ];
                }
 
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 74ffc88..3261002 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3411,7 +3411,7 @@
                # string or an array containing the string and any flags. This 
mungs
                # things around to match what this method should return.
                if ( !is_array( $result ) ) {
-                       $result =[
+                       $result = [
                                'found' => true,
                                'text' => $result,
                        ];
diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index 5e2845f..c7146a1 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -1062,11 +1062,13 @@
                                'speculativeRevIdCallback' => null,
                        ];
 
+                       // @codingStandardsIgnoreStart 
Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfterAmp
                        Hooks::run( 'ParserOptionsRegister', [
                                &self::$defaults,
                                &self::$inCacheKey,
                                &self::$lazyOptions,
                        ] );
+                       // @codingStandardsIgnoreEnd
 
                        ksort( self::$inCacheKey );
                }
diff --git a/includes/parser/Preprocessor_DOM.php 
b/includes/parser/Preprocessor_DOM.php
index 3c750ad..2588962 100644
--- a/includes/parser/Preprocessor_DOM.php
+++ b/includes/parser/Preprocessor_DOM.php
@@ -625,7 +625,7 @@
                                $curLen = strlen( $curChar );
                                $count = ( $curLen > 1 ) ?
                                        # allow the final character to repeat
-                                       strspn( $text, $curChar[$curLen-1], 
$i+1 ) + 1 :
+                                       strspn( $text, $curChar[$curLen - 1], 
$i + 1 ) + 1 :
                                        strspn( $text, $curChar, $i );
 
                                # we need to add to stack only if opening brace 
count is enough for one of the rules
diff --git a/includes/parser/Preprocessor_Hash.php 
b/includes/parser/Preprocessor_Hash.php
index 25d253f..9ea8fa3 100644
--- a/includes/parser/Preprocessor_Hash.php
+++ b/includes/parser/Preprocessor_Hash.php
@@ -569,7 +569,7 @@
                                $curLen = strlen( $curChar );
                                $count = ( $curLen > 1 ) ?
                                        # allow the final character to repeat
-                                       strspn( $text, $curChar[$curLen-1], 
$i+1 ) + 1 :
+                                       strspn( $text, $curChar[$curLen - 1], 
$i + 1 ) + 1 :
                                        strspn( $text, $curChar, $i );
 
                                # we need to add to stack only if opening brace 
count is enough for one of the rules
diff --git a/includes/profiler/SectionProfiler.php 
b/includes/profiler/SectionProfiler.php
index db5ccaf..57bd01f 100644
--- a/includes/profiler/SectionProfiler.php
+++ b/includes/profiler/SectionProfiler.php
@@ -298,7 +298,7 @@
                        /* Find all items under this entry */
                        $level = $stack[$max][1];
                        $working = [];
-                       for ( $i = $max -1; $i >= 0; $i-- ) {
+                       for ( $i = $max - 1; $i >= 0; $i-- ) {
                                if ( $stack[$i][1] > $level ) {
                                        $working[] = $stack[$i];
                                } else {
@@ -439,7 +439,7 @@
        protected function calltreeCount( $stack, $start ) {
                $level = $stack[$start][1];
                $count = 0;
-               for ( $i = $start -1; $i >= 0 && $stack[$i][1] > $level; $i-- ) 
{
+               for ( $i = $start - 1; $i >= 0 && $stack[$i][1] > $level; $i-- 
) {
                        $count ++;
                }
                return $count;
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 70117db..3e78488 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -138,7 +138,7 @@
         * @return mixed the feature value or null if unset
         */
        public function getFeatureData( $feature ) {
-               if ( isset ( $this->features[$feature] ) ) {
+               if ( isset( $this->features[$feature] ) ) {
                        return $this->features[$feature];
                }
                return null;
diff --git a/includes/search/SearchSqlite.php b/includes/search/SearchSqlite.php
index 2c82c7d..3d4da42 100644
--- a/includes/search/SearchSqlite.php
+++ b/includes/search/SearchSqlite.php
@@ -145,7 +145,7 @@
                $searchChars = parent::legalSearchChars( $type );
                if ( $type === self::CHARS_ALL ) {
                        // " for phrase, * for wildcard
-                       $searchChars =  "\"*" . $searchChars;
+                       $searchChars = "\"*" . $searchChars;
                }
                return $searchChars;
        }
diff --git a/includes/site/Site.php b/includes/site/Site.php
index 31e1590..a6e6339 100644
--- a/includes/site/Site.php
+++ b/includes/site/Site.php
@@ -333,7 +333,7 @@
         */
        public function getLinkPath() {
                $type = $this->getLinkPathType();
-               return $type === null ? null: $this->getPath( $type );
+               return $type === null ? null : $this->getPath( $type );
        }
 
        /**
diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index 2dccee1..0478409 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -1156,7 +1156,7 @@
                        // Don't show a "create account" link if the user can't.
                        if ( $this->showCreateAccountLink() ) {
                                // link to the other action
-                               $linkTitle = $this->getTitleFor( 
$this->isSignup() ? 'Userlogin' :'CreateAccount' );
+                               $linkTitle = $this->getTitleFor( 
$this->isSignup() ? 'Userlogin' : 'CreateAccount' );
                                $linkq = 
$this->getReturnToQueryStringFragment();
                                // Pass any language selection on to the mode 
switch link
                                if ( $this->mLanguage ) {
diff --git a/includes/specials/SpecialExport.php 
b/includes/specials/SpecialExport.php
index d5c5528..8e6c446 100644
--- a/includes/specials/SpecialExport.php
+++ b/includes/specials/SpecialExport.php
@@ -288,7 +288,7 @@
                $formDescriptor += [
                        'wpDownload' => [
                                'type' => 'check',
-                               'name' =>'wpDownload',
+                               'name' => 'wpDownload',
                                'id' => 'wpDownload',
                                'default' => $request->wasPosted() ? 
$request->getCheck( 'wpDownload' ) : true,
                                'label-message' => 'export-download',
diff --git a/includes/specials/SpecialMediaStatistics.php 
b/includes/specials/SpecialMediaStatistics.php
index 83efbcb..1312501 100644
--- a/includes/specials/SpecialMediaStatistics.php
+++ b/includes/specials/SpecialMediaStatistics.php
@@ -197,7 +197,7 @@
                $row .= Html::rawElement(
                        'td',
                        // Make sure js sorts it in numeric order
-                       [ 'data-sort-value' =>  $bytes ],
+                       [ 'data-sort-value' => $bytes ],
                        $this->msg( 'mediastatistics-nbytes' )
                                ->numParams( $bytes )
                                ->sizeParams( $bytes )
diff --git a/includes/specials/SpecialRevisiondelete.php 
b/includes/specials/SpecialRevisiondelete.php
index 4b0fa00..e1d4dd1 100644
--- a/includes/specials/SpecialRevisiondelete.php
+++ b/includes/specials/SpecialRevisiondelete.php
@@ -73,28 +73,28 @@
                        'success' => 'revdelete-success',
                        'failure' => 'revdelete-failure',
                        'text' => 'revdelete-text-text',
-                       'selected'=> 'revdelete-selected-text',
+                       'selected' => 'revdelete-selected-text',
                ],
                'archive' => [
                        'check-label' => 'revdelete-hide-text',
                        'success' => 'revdelete-success',
                        'failure' => 'revdelete-failure',
                        'text' => 'revdelete-text-text',
-                       'selected'=> 'revdelete-selected-text',
+                       'selected' => 'revdelete-selected-text',
                ],
                'oldimage' => [
                        'check-label' => 'revdelete-hide-image',
                        'success' => 'revdelete-success',
                        'failure' => 'revdelete-failure',
                        'text' => 'revdelete-text-file',
-                       'selected'=> 'revdelete-selected-file',
+                       'selected' => 'revdelete-selected-file',
                ],
                'filearchive' => [
                        'check-label' => 'revdelete-hide-image',
                        'success' => 'revdelete-success',
                        'failure' => 'revdelete-failure',
                        'text' => 'revdelete-text-file',
-                       'selected'=> 'revdelete-selected-file',
+                       'selected' => 'revdelete-selected-file',
                ],
                'logging' => [
                        'check-label' => 'revdelete-hide-name',
diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index d23625a..51ddc0b 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -596,7 +596,7 @@
                // default string representation, for example, and would 
confuse comparisons.
 
                // Misleadingly, the 'days' option supports hours too.
-               $days = array_map( 'strval', [ 1/24, 2/24, 6/24, 12/24, 1, 3, 7 
] );
+               $days = array_map( 'strval', [ 1 / 24, 2 / 24, 6 / 24, 12 / 24, 
1, 3, 7 ] );
 
                $userWatchlistOption = (string)$this->getUser()->getOption( 
'watchlistdays' );
                // add the user preference, if it isn't available already
diff --git a/includes/specials/helpers/LoginHelper.php 
b/includes/specials/helpers/LoginHelper.php
index cfcbf65..a35a420 100644
--- a/includes/specials/helpers/LoginHelper.php
+++ b/includes/specials/helpers/LoginHelper.php
@@ -75,7 +75,7 @@
                // Allow modification of redirect behavior
                Hooks::run( 'PostLoginRedirect', [ &$returnTo, &$returnToQuery, 
&$type ] );
 
-               $returnToTitle = Title::newFromText( $returnTo ) ?:  
Title::newMainPage();
+               $returnToTitle = Title::newFromText( $returnTo ) ?: 
Title::newMainPage();
 
                if ( $wgSecureLogin && !$stickHTTPS ) {
                        $options = [ 'http' ];
diff --git a/includes/specials/pagers/UsersPager.php 
b/includes/specials/pagers/UsersPager.php
index cdb9130..a68fe66 100644
--- a/includes/specials/pagers/UsersPager.php
+++ b/includes/specials/pagers/UsersPager.php
@@ -270,7 +270,7 @@
        function getPageHeader() {
                list( $self ) = explode( '/', 
$this->getTitle()->getPrefixedDBkey() );
 
-               $groupOptions = [ $this->msg( 'group-all' )->text() =>  '' ];
+               $groupOptions = [ $this->msg( 'group-all' )->text() => '' ];
                foreach ( $this->getAllGroups() as $group => $groupText ) {
                        $groupOptions[ $groupText ] = $group;
                }
diff --git a/includes/tidy/Balancer.php b/includes/tidy/Balancer.php
index 4852ce5..b29a3af 100644
--- a/includes/tidy/Balancer.php
+++ b/includes/tidy/Balancer.php
@@ -1203,7 +1203,7 @@
                        $furthestBlock = null;
                        $furthestBlockIndex = -1;
                        $stackLength = $this->length();
-                       for ( $i = $index+1; $i < $stackLength; $i++ ) {
+                       for ( $i = $index + 1; $i < $stackLength; $i++ ) {
                                if ( $this->node( $i )->isA( 
BalanceSets::$specialSet ) ) {
                                        $furthestBlock = $this->node( $i );
                                        $furthestBlockIndex = $i;
@@ -1225,7 +1225,7 @@
 
                        // Let the common ancestor be the element immediately 
above
                        // the formatting element in the stack of open elements.
-                       $ancestor = $this->node( $index-1 );
+                       $ancestor = $this->node( $index - 1 );
 
                        // Let a bookmark note the position of the formatting
                        // element in the list of active formatting elements
@@ -2116,7 +2116,7 @@
                                return $this->insertToken( $token, $value, 
$attribs, $selfClose );
                        }
                        // "Any other start tag"
-                       $adjusted = ( $this->fragmentContext && 
$this->stack->length()===1 ) ?
+                       $adjusted = ( $this->fragmentContext && 
$this->stack->length() === 1 ) ?
                                $this->fragmentContext : 
$this->stack->currentNode;
                        $this->stack->insertForeignElement(
                                $adjusted->namespaceURI, $value, $attribs
@@ -2242,7 +2242,7 @@
 
        private function switchMode( $mode ) {
                Assert::parameter(
-                       substr( $mode, -4 )==='Mode', '$mode', 'should end in 
Mode'
+                       substr( $mode, -4 ) === 'Mode', '$mode', 'should end in 
Mode'
                );
                $oldMode = $this->parseMode;
                $this->parseMode = $mode;
@@ -2267,8 +2267,8 @@
                                switch ( $node->localName ) {
                                case 'select':
                                        $stackLength = $this->stack->length();
-                                       for ( $j = $i + 1; $j < $stackLength-1; 
$j++ ) {
-                                               $ancestor = $this->stack->node( 
$stackLength-$j-1 );
+                                       for ( $j = $i + 1; $j < $stackLength - 
1; $j++ ) {
+                                               $ancestor = $this->stack->node( 
$stackLength - $j - 1 );
                                                if ( $ancestor->isHtmlNamed( 
'template' ) ) {
                                                        break;
                                                }
diff --git a/includes/widget/search/InterwikiSearchResultSetWidget.php 
b/includes/widget/search/InterwikiSearchResultSetWidget.php
index 9145bb6..81a1a43 100644
--- a/includes/widget/search/InterwikiSearchResultSetWidget.php
+++ b/includes/widget/search/InterwikiSearchResultSetWidget.php
@@ -176,7 +176,7 @@
                $iwIconUrl = $parsed['scheme'] .
                        $parsed['delimiter'] .
                        $parsed['host'] .
-                       ( isset ( $parsed['port'] ) ? ':' . $parsed['port'] : 
'' ) .
+                       ( isset( $parsed['port'] ) ? ':' . $parsed['port'] : '' 
) .
                        '/favicon.ico';
 
                $iwIcon = new OOUI\IconWidget( [
diff --git a/includes/widget/search/InterwikiSearchResultWidget.php 
b/includes/widget/search/InterwikiSearchResultWidget.php
index bcd1c16..4eead5e 100644
--- a/includes/widget/search/InterwikiSearchResultWidget.php
+++ b/includes/widget/search/InterwikiSearchResultWidget.php
@@ -61,6 +61,6 @@
                }
 
                return Html::rawElement( 'div', [ 'class' => 'iw-result__title' 
], $link . ' ' . $redirect ) .
-                       Html::rawElement( 'div', [ 'class'=> 
'iw-result__content' ], $snippet );
+                       Html::rawElement( 'div', [ 'class' => 
'iw-result__content' ], $snippet );
        }
 }
diff --git a/languages/Language.php b/languages/Language.php
index 92dad9b..fc7b21d 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -1584,9 +1584,9 @@
         * @return int[]
         */
        private static function tsToIranian( $ts ) {
-               $gy = substr( $ts, 0, 4 ) -1600;
-               $gm = substr( $ts, 4, 2 ) -1;
-               $gd = substr( $ts, 6, 2 ) -1;
+               $gy = substr( $ts, 0, 4 ) - 1600;
+               $gm = substr( $ts, 4, 2 ) - 1;
+               $gd = substr( $ts, 6, 2 ) - 1;
 
                # Days passed from the beginning (including leap years)
                $gDayNo = 365 * $gy
@@ -1666,7 +1666,7 @@
                                                                (int)( ( 275 * 
$zm ) / 9 ) + $zd + 1729777;
                }
 
-               $zl = $zjd -1948440 + 10632;
+               $zl = $zjd - 1948440 + 10632;
                $zn = (int)( ( $zl - 1 ) / 10631 );
                $zl = $zl - 10631 * $zn + 354;
                $zj = ( (int)( ( 10985 - $zl ) / 5316 ) ) * ( (int)( ( 50 * $zl 
) / 17719 ) ) +
@@ -3346,7 +3346,7 @@
                                if ( $start < 0 ) {
                                        $start = 0;
                                }
-                               $groupedNumber = substr( $number, $start, $end 
-$start ) . $groupedNumber;
+                               $groupedNumber = substr( $number, $start, $end 
- $start ) . $groupedNumber;
                                $end = $start;
                                if ( $numMatches > 1 ) {
                                        // use the last pattern for the rest of 
the number
diff --git a/languages/classes/LanguageKk.php b/languages/classes/LanguageKk.php
index f6f03c4..1a1438c 100644
--- a/languages/classes/LanguageKk.php
+++ b/languages/classes/LanguageKk.php
@@ -282,7 +282,7 @@
                $ret = '';
 
                foreach ( $matches as $m ) {
-                       $ret .= substr( $text, $mstart, $m[1] -$mstart );
+                       $ret .= substr( $text, $mstart, $m[1] - $mstart );
                        $ret .= $this->regsConverter( $m[0], $toVariant );
                        $mstart = $m[1] + strlen( $m[0] );
                }
diff --git a/languages/classes/LanguageSr.php b/languages/classes/LanguageSr.php
index 6491f55..e0ff5e1 100644
--- a/languages/classes/LanguageSr.php
+++ b/languages/classes/LanguageSr.php
@@ -131,7 +131,7 @@
                $ret = $this->mTables[$toVariant]->replace( $m[0] );
                $mstart = $m[1] + strlen( $m[0] );
                foreach ( $matches as $m ) {
-                       $ret .= substr( $text, $mstart, $m[1] -$mstart );
+                       $ret .= substr( $text, $mstart, $m[1] - $mstart );
                        $ret .= parent::translate( $m[0], $toVariant );
                        $mstart = $m[1] + strlen( $m[0] );
                }
diff --git a/languages/messages/MessagesKm.php 
b/languages/messages/MessagesKm.php
index 967224f..299beb8 100644
--- a/languages/messages/MessagesKm.php
+++ b/languages/messages/MessagesKm.php
@@ -88,7 +88,7 @@
 $dateFormats = [
        'km time' => 'ម៉ោងH:i',
        'km date' => 'l ទីd F ឆ្នាំY',
-       'km both' =>  'ម៉ោងH:i l ទីd F ឆ្នាំY',
+       'km both' => 'ម៉ោងH:i l ទីd F ឆ្នាំY',
 ];
 
 $specialPageAliases = [
diff --git a/maintenance/hhvm/makeRepo.php b/maintenance/hhvm/makeRepo.php
index 2a102b2..c1aa082 100644
--- a/maintenance/hhvm/makeRepo.php
+++ b/maintenance/hhvm/makeRepo.php
@@ -95,7 +95,7 @@
                print "Found " . count( $files ) . " files in " .
                        count( $dirs ) . " directories\n";
 
-               $tmpDir = wfTempDir() . '/mw-make-repo' . mt_rand( 0, 1<<31 );
+               $tmpDir = wfTempDir() . '/mw-make-repo' . mt_rand( 0, 1 << 31 );
                if ( !mkdir( $tmpDir ) ) {
                        $this->error( 'Unable to create temporary directory', 1 
);
                }
diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index 578a226..b099aff 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -448,7 +448,7 @@
                do {
                        $finalConds = $conds;
                        $timestamp = $dbr->addQuotes( $timestamp );
-                       $finalConds []=
+                       $finalConds [] =
                                "(cl_timestamp > $timestamp OR (cl_timestamp = 
$timestamp AND cl_from > $lastId))";
                        $res = $dbr->select( [ 'page', 'categorylinks' ],
                                [ 'page_id', 'cl_timestamp' ],
diff --git a/tests/phpunit/MediaWikiTestCase.php 
b/tests/phpunit/MediaWikiTestCase.php
index 4afe710..18e6e97 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -300,7 +300,7 @@
                        'ConfigFactory',
                        self::makeTestConfigFactoryInstantiator(
                                $oldConfigFactory,
-                               [ 'main' =>  $bootstrapConfig ]
+                               [ 'main' => $bootstrapConfig ]
                        )
                );
                $newServices->resetServiceForTesting( 'DBLoadBalancerFactory' );
diff --git a/tests/phpunit/includes/changes/ChangesListFilterTest.php 
b/tests/phpunit/includes/changes/ChangesListFilterTest.php
index 0015453..811c8c2 100644
--- a/tests/phpunit/includes/changes/ChangesListFilterTest.php
+++ b/tests/phpunit/includes/changes/ChangesListFilterTest.php
@@ -84,7 +84,7 @@
                        ]
                );
 
-               $groupB =  $this->getGroup(
+               $groupB = $this->getGroup(
                        [
                                'name' => 'groupB',
                                'filters' => [
diff --git a/tests/phpunit/includes/config/EtcdConfigTest.php 
b/tests/phpunit/includes/config/EtcdConfigTest.php
index 19cffa2..c13cf25 100644
--- a/tests/phpunit/includes/config/EtcdConfigTest.php
+++ b/tests/phpunit/includes/config/EtcdConfigTest.php
@@ -90,7 +90,7 @@
         */
        public function testConstructCacheSpec() {
                $config = $this->createConfigMock( [ 'cache' => [
-                       'class' =>  HashBagOStuff::class
+                       'class' => HashBagOStuff::class
                ] ] );
                $config->expects( $this->once() )->method( 'fetchAllFromEtcd' )
                        ->willReturn( [
diff --git a/tests/phpunit/includes/interwiki/ClassicInterwikiLookupTest.php 
b/tests/phpunit/includes/interwiki/ClassicInterwikiLookupTest.php
index 48310a9..fd3b0b8 100644
--- a/tests/phpunit/includes/interwiki/ClassicInterwikiLookupTest.php
+++ b/tests/phpunit/includes/interwiki/ClassicInterwikiLookupTest.php
@@ -39,7 +39,7 @@
                $lookup = new \MediaWiki\Interwiki\ClassicInterwikiLookup(
                        Language::factory( 'en' ),
                        WANObjectCache::newEmpty(),
-                       60*60,
+                       60 * 60,
                        false,
                        3,
                        'en'
@@ -153,7 +153,7 @@
                $lookup = new \MediaWiki\Interwiki\ClassicInterwikiLookup(
                        Language::factory( 'en' ),
                        WANObjectCache::newEmpty(),
-                       60*60,
+                       60 * 60,
                        $cdbFile,
                        3,
                        'en'
@@ -204,7 +204,7 @@
                $lookup = new \MediaWiki\Interwiki\ClassicInterwikiLookup(
                        Language::factory( 'en' ),
                        WANObjectCache::newEmpty(),
-                       60*60,
+                       60 * 60,
                        $hash,
                        3,
                        'en'
diff --git a/tests/phpunit/mocks/media/MockOggHandler.php 
b/tests/phpunit/mocks/media/MockOggHandler.php
index 99992fe..bb686fd 100644
--- a/tests/phpunit/mocks/media/MockOggHandler.php
+++ b/tests/phpunit/mocks/media/MockOggHandler.php
@@ -51,7 +51,7 @@
                        'length' => $this->getLength( $file ),
                        'offset' => $this->getOffset( $file ),
                        'width' => $targetWidth,
-                       'height' =>  $targetHeight,
+                       'height' => $targetHeight,
                        'isVideo' => !$this->isAudio( $file ),
                        'thumbtime' => isset(
                                $params['thumbtime']
@@ -59,7 +59,7 @@
                        'start' => isset( $params['start'] ) ? $params['start'] 
: false,
                        'end' => isset( $params['end'] ) ? $params['end'] : 
false,
                        'fillwindow' => isset( $params['fillwindow'] ) ? 
$params['fillwindow'] : false,
-                       'disablecontrols' => isset ( $params['disablecontrols'] 
) ? $params['disablecontrols'] : false
+                       'disablecontrols' => isset( $params['disablecontrols'] 
) ? $params['disablecontrols'] : false
                ];
 
                // No thumbs for audio
diff --git a/tests/qunit/data/load.mock.php b/tests/qunit/data/load.mock.php
index 71cf852..671bdf1 100644
--- a/tests/qunit/data/load.mock.php
+++ b/tests/qunit/data/load.mock.php
@@ -42,17 +42,17 @@
 }, {}, {});
 ",
 
-       'testSkipped' =>"
+       'testSkipped' => "
 mw.loader.implement( 'testSkipped', function () {
        QUnit.ok( false, 'Module testSkipped was supposed to be skipped.' );
 }, {}, {});
 ",
 
-       'testNotSkipped' =>"
+       'testNotSkipped' => "
 mw.loader.implement( 'testNotSkipped', function () {}, {}, {});
 ",
 
-       'testUsesSkippable' =>"
+       'testUsesSkippable' => "
 mw.loader.implement( 'testUsesSkippable', function () {}, {}, {});
 ",
 ];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch <christoph.jau...@wikimedia.de>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: C. Scott Ananian <canan...@wikimedia.org>
Gerrit-Reviewer: DCausse <dcau...@wikimedia.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: Fomafix <foma...@googlemail.com>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: Smalyshev <smalys...@wikimedia.org>
Gerrit-Reviewer: TTO <at.li...@live.com.au>
Gerrit-Reviewer: Tpt <thoma...@hotmail.fr>
Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: WMDE-Fisch <christoph.jau...@wikimedia.de>
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