[MediaWiki-commits] [Gerrit] mediawiki/core[master]: update mediawiki-codesniffer to 0.11.0 and fix issues
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 =
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: update mediawiki-codesniffer to 0.11.0 and fix issues
WMDE-Fisch has uploaded a new change for review. ( 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 Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c --- M composer.json M includes/Block.php M includes/DefaultSettings.php M includes/EditPage.php M includes/MovePage.php M includes/OutputPage.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/ChangesList.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/specialpage/RedirectSpecialPage.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/changes/EnhancedChangesListTest.php M tests/phpunit/includes/changes/OldChangesListTest.php M tests/phpunit/includes/config/EtcdConfigTest.php M tests/phpunit/includes/interwiki/ClassicInterwikiLookupTest.php M tests/phpunit/includes/specials/SpecialRecentchangesTest.php M tests/phpunit/mocks/media/MockOggHandler.php M tests/qunit/data/load.mock.php 53 files changed, 100 insertions(+), 92 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/371474/1 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 cfb78cd..4daf475 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( [