Merge "HooksTest: Covers Hooks::callHook too"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 2 Jan 2018 11:55:26 +0000 (11:55 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 2 Jan 2018 11:55:26 +0000 (11:55 +0000)
148 files changed:
.phpcs.xml
autoload.php
composer.json
includes/DeprecatedGlobal.php
includes/HistoryBlob.php
includes/PHPVersionCheck.php
includes/Setup.php
includes/api/ApiBlock.php
includes/api/ApiErrorFormatter.php
includes/api/ApiRevisionDelete.php
includes/cache/CacheHelper.php
includes/cache/localisation/LocalisationCache.php
includes/changetags/ChangeTagsLogList.php
includes/changetags/ChangeTagsRevisionList.php
includes/content/TextContentHandler.php
includes/exception/MWExceptionHandler.php
includes/htmlform/fields/HTMLEditTools.php
includes/installer/Installer.php
includes/installer/OracleInstaller.php
includes/jobqueue/JobQueueFederated.php
includes/libs/JavaScriptMinifier.php
includes/libs/jsminplus.php
includes/libs/lockmanager/ScopedLock.php
includes/libs/objectcache/MemcachedClient.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php
includes/libs/xmp/XMP.php
includes/libs/xmp/XMPValidate.php
includes/media/Bitmap_ClientOnly.php
includes/page/ImagePage.php
includes/parser/Parser.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/poolcounter/PoolCounter.php
includes/poolcounter/PoolCounterRedis.php
includes/shell/Command.php
includes/skins/SkinFallbackTemplate.php
includes/specialpage/QueryPage.php
includes/specials/SpecialEditTags.php
includes/specials/SpecialExport.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialRevisiondelete.php
includes/specials/pagers/ImageListPager.php
includes/upload/UploadBase.php
includes/utils/AutoloadGenerator.php
includes/widget/search/BasicSearchResultSetWidget.php
includes/widget/search/SearchFormWidget.php
includes/widget/search/SimpleSearchResultSetWidget.php
index.php
languages/Language.php
languages/LanguageConverter.php
languages/classes/LanguageBe_tarask.php
languages/classes/LanguageBg.php [deleted file]
languages/classes/LanguageEs.php [deleted file]
languages/classes/LanguageEt.php [deleted file]
languages/classes/LanguageHy.php
languages/classes/LanguageKaa.php
languages/classes/LanguageKk_cyrl.php
languages/classes/LanguageKsh.php
languages/classes/LanguageKu.php
languages/classes/LanguageKu_ku.php [deleted file]
languages/classes/LanguagePl.php [deleted file]
languages/classes/LanguageRu.php [deleted file]
languages/classes/LanguageUk.php [deleted file]
languages/classes/LanguageZh_hans.php
languages/i18n/be-tarask.json
languages/i18n/de.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/ja.json
languages/i18n/lb.json
languages/messages/MessagesBe_tarask.php
languages/messages/MessagesBg.php
languages/messages/MessagesEs.php
languages/messages/MessagesEt.php
languages/messages/MessagesHy.php
languages/messages/MessagesKaa.php
languages/messages/MessagesKk_cyrl.php
languages/messages/MessagesKsh.php
languages/messages/MessagesKu_latn.php
languages/messages/MessagesPl.php
languages/messages/MessagesRu.php
languages/messages/MessagesUk.php
maintenance/benchmarks/bench_utf8_title_check.php
maintenance/commandLine.inc
maintenance/deleteBatch.php
maintenance/doMaintenance.php
maintenance/generateSitemap.php
maintenance/language/checkLanguage.inc
maintenance/mergeMessageFileList.php
maintenance/moveBatch.php
maintenance/storage/compressOld.php
maintenance/update.php
maintenance/userOptions.php
mw-config/index.php
profileinfo.php
tests/common/TestsAutoLoader.php
tests/parser/ParserTestParserHook.php
tests/parser/editTests.php
tests/phan/stubs/hhvm.php
tests/phan/stubs/mail.php
tests/phan/stubs/memcached.php
tests/phan/stubs/tideways.php
tests/phan/stubs/wikidiff.php
tests/phpunit/includes/LinkerTest.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/PathRouterTest.php
tests/phpunit/includes/SampleTest.php
tests/phpunit/includes/api/ApiComparePagesTest.php
tests/phpunit/includes/api/format/ApiFormatPhpTest.php
tests/phpunit/includes/api/format/ApiFormatXmlTest.php
tests/phpunit/includes/changes/ChangesListFilterGroupTest.php
tests/phpunit/includes/changes/ChangesListFilterTest.php
tests/phpunit/includes/content/CssContentHandlerTest.php
tests/phpunit/includes/content/CssContentTest.php
tests/phpunit/includes/content/JavaScriptContentHandlerTest.php
tests/phpunit/includes/content/JavaScriptContentTest.php
tests/phpunit/includes/import/ImportTest.php
tests/phpunit/includes/libs/CSSMinTest.php
tests/phpunit/includes/libs/XmlTypeCheckTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
tests/phpunit/includes/media/ExifBitmapTest.php
tests/phpunit/includes/media/GIFTest.php
tests/phpunit/includes/media/JpegTest.php
tests/phpunit/includes/media/PNGTest.php
tests/phpunit/includes/media/SVGMetadataExtractorTest.php
tests/phpunit/includes/media/TiffTest.php
tests/phpunit/includes/media/WebPTest.php
tests/phpunit/includes/page/WikiPageDbTestBase.php
tests/phpunit/includes/parser/ParserOutputTest.php
tests/phpunit/includes/parser/PreprocessorTest.php
tests/phpunit/includes/password/BcryptPasswordTest.php
tests/phpunit/includes/password/EncryptedPasswordTest.php
tests/phpunit/includes/password/LayeredParameterizedPasswordTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php
tests/phpunit/includes/shell/FirejailCommandTest.php
tests/phpunit/includes/site/DBSiteStoreTest.php
tests/phpunit/includes/site/SiteListTest.php
tests/phpunit/includes/tidy/RemexDriverTest.php
tests/phpunit/includes/upload/UploadBaseTest.php
tests/phpunit/includes/utils/MWCryptHKDFTest.php
tests/phpunit/includes/utils/MWCryptHashTest.php
tests/phpunit/languages/LanguageTest.php
tests/phpunit/languages/classes/LanguageBe_taraskTest.php
tests/phpunit/languages/classes/LanguagePlTest.php
tests/phpunit/languages/classes/LanguageRuTest.php
tests/phpunit/languages/classes/LanguageUkTest.php
tests/phpunit/maintenance/backupPrefetchTest.php

index 3170381..7f90f27 100644 (file)
                <exclude name="MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals" />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
-               <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
+               <exclude name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
                <exclude name="MediaWiki.VariableAnalysis.ForbiddenGlobalVariables.ForbiddenGlobal$wgTitle" />
                <exclude name="MediaWiki.Usage.DeprecatedConstantUsage.NS_IMAGE" />
                <exclude name="MediaWiki.Usage.DeprecatedConstantUsage.NS_IMAGE_TALK" />
                <exclude name="MediaWiki.Commenting.FunctionComment.SpacingDocStar" />
                <exclude name="MediaWiki.Commenting.FunctionComment.SpacingDocTag" />
+               <exclude name="Squiz.Scope.MethodScope.Missing" />
+               <exclude name="Squiz.Scope.MemberVarScope.Missing" />
        </rule>
        <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
                <properties>
index c37d9f7..4a8e18d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // This file is generated by maintenance/generateLocalAutoload.php, do not adjust manually
-// @codingStandardsIgnoreFile
+// phpcs:ignoreFile Generic.Files.LineLength
 global $wgAutoloadLocalClasses;
 
 $wgAutoloadLocalClasses = [
@@ -705,7 +705,6 @@ $wgAutoloadLocalClasses = [
        'LanguageAr' => __DIR__ . '/languages/classes/LanguageAr.php',
        'LanguageAz' => __DIR__ . '/languages/classes/LanguageAz.php',
        'LanguageBe_tarask' => __DIR__ . '/languages/classes/LanguageBe_tarask.php',
-       'LanguageBg' => __DIR__ . '/languages/classes/LanguageBg.php',
        'LanguageBs' => __DIR__ . '/languages/classes/LanguageBs.php',
        'LanguageCode' => __DIR__ . '/languages/LanguageCode.php',
        'LanguageConverter' => __DIR__ . '/languages/LanguageConverter.php',
@@ -713,8 +712,6 @@ $wgAutoloadLocalClasses = [
        'LanguageCu' => __DIR__ . '/languages/classes/LanguageCu.php',
        'LanguageDsb' => __DIR__ . '/languages/classes/LanguageDsb.php',
        'LanguageEn' => __DIR__ . '/languages/classes/LanguageEn.php',
-       'LanguageEs' => __DIR__ . '/languages/classes/LanguageEs.php',
-       'LanguageEt' => __DIR__ . '/languages/classes/LanguageEt.php',
        'LanguageFi' => __DIR__ . '/languages/classes/LanguageFi.php',
        'LanguageGa' => __DIR__ . '/languages/classes/LanguageGa.php',
        'LanguageGan' => __DIR__ . '/languages/classes/LanguageGan.php',
@@ -729,21 +726,17 @@ $wgAutoloadLocalClasses = [
        'LanguageKm' => __DIR__ . '/languages/classes/LanguageKm.php',
        'LanguageKsh' => __DIR__ . '/languages/classes/LanguageKsh.php',
        'LanguageKu' => __DIR__ . '/languages/classes/LanguageKu.php',
-       'LanguageKu_ku' => __DIR__ . '/languages/classes/LanguageKu_ku.php',
        'LanguageLa' => __DIR__ . '/languages/classes/LanguageLa.php',
        'LanguageMl' => __DIR__ . '/languages/classes/LanguageMl.php',
        'LanguageMy' => __DIR__ . '/languages/classes/LanguageMy.php',
        'LanguageOs' => __DIR__ . '/languages/classes/LanguageOs.php',
-       'LanguagePl' => __DIR__ . '/languages/classes/LanguagePl.php',
        'LanguageQqx' => __DIR__ . '/languages/classes/LanguageQqx.php',
-       'LanguageRu' => __DIR__ . '/languages/classes/LanguageRu.php',
        'LanguageShi' => __DIR__ . '/languages/classes/LanguageShi.php',
        'LanguageSl' => __DIR__ . '/languages/classes/LanguageSl.php',
        'LanguageSr' => __DIR__ . '/languages/classes/LanguageSr.php',
        'LanguageTg' => __DIR__ . '/languages/classes/LanguageTg.php',
        'LanguageTr' => __DIR__ . '/languages/classes/LanguageTr.php',
        'LanguageTyv' => __DIR__ . '/languages/classes/LanguageTyv.php',
-       'LanguageUk' => __DIR__ . '/languages/classes/LanguageUk.php',
        'LanguageUz' => __DIR__ . '/languages/classes/LanguageUz.php',
        'LanguageWa' => __DIR__ . '/languages/classes/LanguageWa.php',
        'LanguageYue' => __DIR__ . '/languages/classes/LanguageYue.php',
index 8b8697e..cc29165 100644 (file)
@@ -54,7 +54,7 @@
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "jetbrains/phpstorm-stubs": "dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a",
                "justinrainbow/json-schema": "~5.2",
-               "mediawiki/mediawiki-codesniffer": "14.1.0",
+               "mediawiki/mediawiki-codesniffer": "15.0.0",
                "monolog/monolog": "~1.22.1",
                "nikic/php-parser": "2.1.0",
                "nmred/kafka-php": "0.1.5",
index 60dde40..242cecf 100644 (file)
@@ -37,9 +37,7 @@ class DeprecatedGlobal extends StubObject {
                $this->version = $version;
        }
 
-       // @codingStandardsIgnoreStart
-       // PSR2.Methods.MethodDeclaration.Underscore
-       // PSR2.Classes.PropertyDeclaration.ScopeMissing
+       // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore,PSR2.Classes.PropertyDeclaration.ScopeMissing
        function _newObject() {
                /* Put the caller offset for wfDeprecated as 6, as
                 * that gives the function that uses this object, since:
@@ -56,5 +54,4 @@ class DeprecatedGlobal extends StubObject {
                wfDeprecated( '$' . $this->global, $this->version, false, 6 );
                return parent::_newObject();
        }
-       // @codingStandardsIgnoreEnd
 }
index 5193168..075b48d 100644 (file)
@@ -700,7 +700,7 @@ class DiffHistoryBlob implements HistoryBlob {
 
 }
 
-// @codingStandardsIgnoreStart
+// phpcs:ignore Generic.CodeAnalysis.UnconditionalIfStatement.Found
 if ( false ) {
        // Blobs generated by MediaWiki < 1.5 on PHP 4 were serialized with the
        // class name coerced to lowercase. We can improve efficiency by adding
@@ -711,4 +711,3 @@ if ( false ) {
        class_alias( 'HistoryBlobCurStub', 'historyblobcurstub' );
        class_alias( 'HistoryBlobStub', 'historyblobstub' );
 }
-// @codingStandardsIgnoreEnd
index a862903..0a9bba8 100644 (file)
@@ -1,7 +1,5 @@
 <?php
-// @codingStandardsIgnoreFile Generic.Arrays.DisallowLongArraySyntax
-// @codingStandardsIgnoreFile Generic.Files.LineLength
-// @codingStandardsIgnoreFile MediaWiki.Usage.DirUsage.FunctionFound
+// phpcs:ignoreFile Generic.Arrays.DisallowLongArraySyntax,MediaWiki.Usage.DirUsage.FunctionFound
 /**
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -126,6 +124,7 @@ class PHPVersionCheck {
                                . "{$otherInfo['minSupported']}.\n\nCheck if you have a"
                                . " newer php executable with a different name, such as php5.\n\n";
 
+                       // phpcs:ignore Generic.Files.LineLength
                        $longHtml = <<<HTML
                        Please consider <a href="{$phpInfo['upgradeURL']}">upgrading your copy of
                        {$phpInfo['implementation']}</a>.
@@ -140,6 +139,7 @@ class PHPVersionCheck {
                        See our<a href="https://www.mediawiki.org/wiki/Compatibility#PHP">compatibility page</a>
                        for details of which versions are compatible with prior versions of {$phpInfo['implementation']}.
 HTML;
+                       // phpcs:enable
                        $this->triggerError(
                                "Supported {$phpInfo['implementation']} versions",
                                $shortText,
@@ -164,12 +164,14 @@ HTML;
                                . "https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries\n"
                                . "for help on installing the required components.";
 
+                       // phpcs:ignore Generic.Files.LineLength
                        $longHtml = <<<HTML
                MediaWiki now also has some external dependencies that need to be installed via
                composer or from a separate git repo. Please see
                <a href="https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries">mediawiki.org</a>
                for help on installing the required components.
 HTML;
+                       // phpcs:enable
 
                        $this->triggerError( 'External dependencies', $shortText, $longText, $longHtml );
                }
index d6f4b2f..4936b0b 100644 (file)
@@ -370,9 +370,8 @@ if ( $wgRCFilterByAge ) {
        // Note that we allow 1 link higher than the max for things like 56 days but a 60 day link.
        sort( $wgRCLinkDays );
 
-       // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+       // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
        for ( $i = 0; $i < count( $wgRCLinkDays ); $i++ ) {
-               // @codingStandardsIgnoreEnd
                if ( $wgRCLinkDays[$i] >= $rcMaxAgeDays ) {
                        $wgRCLinkDays = array_slice( $wgRCLinkDays, 0, $i + 1, false );
                        break;
index 366a6df..df30a2d 100644 (file)
@@ -182,14 +182,14 @@ class ApiBlock extends ApiBase {
        }
 
        protected function getExamplesMessages() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        'action=block&user=192.0.2.5&expiry=3%20days&reason=First%20strike&token=123ABC'
                                => 'apihelp-block-example-ip-simple',
                        'action=block&user=Vandal&expiry=never&reason=Vandalism&nocreate=&autoblock=&noemail=&token=123ABC'
                                => 'apihelp-block-example-user-complex',
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        public function getHelpUrls() {
index 183f7e2..1749ce7 100644 (file)
@@ -361,9 +361,8 @@ class ApiErrorFormatter {
  * @deprecated Only for backwards compatibility, do not use
  * @ingroup API
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class ApiErrorFormatter_BackCompat extends ApiErrorFormatter {
-       // @codingStandardsIgnoreEnd
 
        /**
         * @param ApiResult $result Into which data will be added
index 5a51b28..d7bc931 100644 (file)
@@ -116,11 +116,10 @@ class ApiRevisionDelete extends ApiBase {
                }
 
                $list->reloadFromMaster();
-               // @codingStandardsIgnoreStart Avoid function calls in a FOR loop test part
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $item = $list->reset(); $list->current(); $item = $list->next() ) {
                        $data['items'][$item->getId()] += $item->getApiData( $this->getResult() );
                }
-               // @codingStandardsIgnoreEnd
 
                $data['items'] = array_values( $data['items'] );
                ApiResult::setIndexedTagName( $data['items'], 'i' );
index 8c70be2..e77e251 100644 (file)
@@ -273,7 +273,7 @@ class CacheHelper implements ICacheHelper {
                                $itemKey = array_keys( array_slice( $this->cachedChunks, 0, 1 ) );
                                $itemKey = array_shift( $itemKey );
 
-                               if ( !is_integer( $itemKey ) ) {
+                               if ( !is_int( $itemKey ) ) {
                                        wfWarn( "Attempted to get item with non-numeric key while " .
                                                "the next item in the queue has a key ($itemKey) in " . __METHOD__ );
                                } elseif ( is_null( $itemKey ) ) {
index a0ce95e..5e0a688 100644 (file)
@@ -109,7 +109,8 @@ class LocalisationCache {
        static public $allKeys = [
                'fallback', 'namespaceNames', 'bookstoreList',
                'magicWords', 'messages', 'rtl', 'capitalizeAllNouns', 'digitTransformTable',
-               'separatorTransformTable', 'fallback8bitEncoding', 'linkPrefixExtension',
+               'separatorTransformTable', 'minimumGroupingDigits',
+               'fallback8bitEncoding', 'linkPrefixExtension',
                'linkTrail', 'linkPrefixCharset', 'namespaceAliases',
                'dateFormats', 'datePreferences', 'datePreferenceMigrationMap',
                'defaultDateFormat', 'extraUserToggles', 'specialPageAliases',
index e6d918a..6977172 100644 (file)
@@ -72,9 +72,8 @@ class ChangeTagsLogList extends ChangeTagsList {
         * @return Status
         */
        public function updateChangeTagsOnAll( $tagsToAdd, $tagsToRemove, $params, $reason, $user ) {
-               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $this->reset(); $this->current(); $this->next() ) {
-                       // @codingStandardsIgnoreEnd
                        $item = $this->current();
                        $status = ChangeTags::updateTagsWithChecks( $tagsToAdd, $tagsToRemove,
                                null, null, $item->getId(), $params, $reason, $user );
index 61259b4..19b7e20 100644 (file)
@@ -80,9 +80,8 @@ class ChangeTagsRevisionList extends ChangeTagsList {
         * @return Status
         */
        public function updateChangeTagsOnAll( $tagsToAdd, $tagsToRemove, $params, $reason, $user ) {
-               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $this->reset(); $this->current(); $this->next() ) {
-                       // @codingStandardsIgnoreEnd
                        $item = $this->current();
                        $status = ChangeTags::updateTagsWithChecks( $tagsToAdd, $tagsToRemove,
                                null, $item->getId(), null, $params, $reason, $user );
index ced2a66..4a7944c 100644 (file)
  */
 class TextContentHandler extends ContentHandler {
 
-       // @codingStandardsIgnoreStart T59585
        public function __construct( $modelId = CONTENT_MODEL_TEXT, $formats = [ CONTENT_FORMAT_TEXT ] ) {
                parent::__construct( $modelId, $formats );
        }
-       // @codingStandardsIgnoreEnd
 
        /**
         * Returns the content's text as-is.
index 9b59191..f3d61f0 100644 (file)
@@ -279,7 +279,7 @@ class MWExceptionHandler {
                // HHVM: Class undefined: foo
                // PHP5: Class 'foo' not found
                if ( preg_match( "/Class (undefined: \w+|'\w+' not found)/", $msg ) ) {
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
+                       // phpcs:disable Generic.Files.LineLength
                        $msg = <<<TXT
 {$msg}
 
@@ -287,7 +287,7 @@ MediaWiki or an installed extension requires this class but it is not embedded d
 
 Please see <a href="https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries">mediawiki.org</a> for help on installing the required components.
 TXT;
-                       // @codingStandardsIgnoreEnd
+                       // phpcs:enable
                }
 
                // We can't just create an exception and log it as it is likely that
index 1b5d1fb..4019f81 100644 (file)
@@ -8,8 +8,7 @@ class HTMLEditTools extends HTMLFormField {
        public function getTableRow( $value ) {
                $msg = $this->formatMsg();
 
-               return
-                       '<tr><td></td><td class="mw-input">' .
+               return '<tr><td></td><td class="mw-input">' .
                        '<div class="mw-editTools">' .
                        $msg->parseAsBlock() .
                        "</div></td></tr>\n";
index 2bb15b8..5ea9bfe 100644 (file)
@@ -595,11 +595,10 @@ abstract class Installer {
                global $wgAutoloadClasses;
                $wgAutoloadClasses = [];
 
-               // @codingStandardsIgnoreStart
                // LocalSettings.php should not call functions, except wfLoadSkin/wfLoadExtensions
                // Define the required globals here, to ensure, the functions can do it work correctly.
+               // phpcs:ignore MediaWiki.VariableAnalysis.UnusedGlobalVariables
                global $wgExtensionDirectory, $wgStyleDirectory;
-               // @codingStandardsIgnoreEnd
 
                MediaWiki\suppressWarnings();
                $_lsExists = file_exists( "$IP/LocalSettings.php" );
index 05f078f..e5418e4 100644 (file)
@@ -335,11 +335,11 @@ class OracleInstaller extends DatabaseInstaller {
         * @return bool Whether the connection string is valid.
         */
        public static function checkConnectStringFormat( $connect_string ) {
-               // @@codingStandardsIgnoreStart Long lines with regular expressions.
+               // phpcs:disable Generic.Files.LineLength
                // @todo Very long regular expression. Make more readable?
                $isValid = preg_match( '/^[[:alpha:]][\w\-]*(?:\.[[:alpha:]][\w\-]*){0,2}$/', $connect_string ); // TNS name
                $isValid |= preg_match( '/^(?:\/\/)?[\w\-\.]+(?::[\d]+)?(?:\/(?:[\w\-\.]+(?::(pooled|dedicated|shared))?)?(?:\/[\w\-\.]+)?)?$/', $connect_string ); // EZConnect
-               // @@codingStandardsIgnoreEnd
+               // phpcs:enable
                return (bool)$isValid;
        }
 }
index e743311..118b0f9 100644 (file)
@@ -184,9 +184,8 @@ class JobQueueFederated extends JobQueue {
                // Try to insert the jobs and update $partitionsTry on any failures.
                // Retry to insert any remaning jobs again, ignoring the bad partitions.
                $jobsLeft = $jobs;
-               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $i = $this->maxPartitionsTry; $i > 0 && count( $jobsLeft ); --$i ) {
-                       // @codingStandardsIgnoreEnd
                        try {
                                $partitionRing->getLiveRing();
                        } catch ( UnexpectedValueException $e ) {
index ea4755e..e0bbb59 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// @codingStandardsIgnoreFile File external to MediaWiki. Ignore coding conventions checks.
+// phpcs:ignoreFile -- File external to MediaWiki. Ignore coding conventions checks.
 /**
  * JavaScript Minifier
  *
index 7feac7d..e3c2d75 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// @codingStandardsIgnoreFile File external to MediaWiki. Ignore coding conventions checks.
+// phpcs:ignoreFile -- File external to MediaWiki. Ignore coding conventions checks.
 /**
  * JSMinPlus version 1.4
  *
index 2ad8ac8..6261335 100644 (file)
@@ -70,7 +70,7 @@ class ScopedLock {
        public static function factory(
                LockManager $manager, array $paths, $type, StatusValue $status, $timeout = 0
        ) {
-               $pathsByType = is_integer( $type ) ? [ $type => $paths ] : $paths;
+               $pathsByType = is_int( $type ) ? [ $type => $paths ] : $paths;
                $lockStatus = $manager->lockByType( $pathsByType, $timeout );
                $status->merge( $lockStatus );
                if ( $lockStatus->isOK() ) {
index 5cb49a9..20e30c5 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// @codingStandardsIgnoreFile It's an external lib and it isn't. Let's not bother.
+// phpcs:ignoreFile -- It's an external lib and it isn't. Let's not bother.
 /**
  * Memcached client for PHP.
  *
index a9eaa99..591e287 100644 (file)
@@ -939,7 +939,7 @@ class LoadBalancer implements ILoadBalancer {
         * @return bool
         */
        private function isOpen( $index ) {
-               if ( !is_integer( $index ) ) {
+               if ( !is_int( $index ) ) {
                        return false;
                }
 
index 931c085..88e816a 100644 (file)
@@ -1318,7 +1318,7 @@ class XMPReader implements LoggerAwareInterface {
                }
        }
 
-       // @codingStandardsIgnoreStart Generic.Files.LineLength
+       // phpcs:disable Generic.Files.LineLength
        /**
         * Process attributes.
         * Simple values can be stored as either a tag or attribute
@@ -1334,7 +1334,7 @@ class XMPReader implements LoggerAwareInterface {
         * @param array $attribs Array attribute=>value
         * @throws RuntimeException
         */
-       // @codingStandardsIgnoreEnd
+       // phpcs:enable
        private function doAttribs( $attribs ) {
                // first check for rdf:parseType attribute, as that can change
                // how the attributes are interperted.
index 76ae279..7aec28e 100644 (file)
@@ -262,14 +262,12 @@ class XMPValidate implements LoggerAwareInterface {
                        return;
                }
                $res = [];
-               // @codingStandardsIgnoreStart Long line that cannot be broken
                if ( !preg_match(
                        /* ahh! scary regex... */
+                       // phpcs:ignore Generic.Files.LineLength
                        '/^([0-3]\d{3})(?:-([01]\d)(?:-([0-3]\d)(?:T([0-2]\d):([0-6]\d)(?::([0-6]\d)(?:\.\d+)?)?([-+]\d{2}:\d{2}|Z)?)?)?)?$/D',
                        $val, $res )
                ) {
-                       // @codingStandardsIgnoreEnd
-
                        $this->logger->info( __METHOD__ . " Expected date but got $val" );
                        $val = null;
                } else {
index 3ec8772..fa5b0a6 100644 (file)
@@ -29,9 +29,8 @@
  *
  * @ingroup Media
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class BitmapHandler_ClientOnly extends BitmapHandler {
-       // @codingStandardsIgnoreEnd
 
        /**
         * @param File $image
index 8724c45..b5ff805 100644 (file)
@@ -539,13 +539,13 @@ class ImagePage extends Article {
                                // The dirmark, however, must not be immediately adjacent
                                // to the filename, because it can get copied with it.
                                // See T27277.
-                               // @codingStandardsIgnoreStart Ignore long line
+                               // phpcs:disable Generic.Files.LineLength
                                $out->addWikiText( <<<EOT
 <div class="fullMedia"><span class="dangerousLink">{$medialink}</span> $dirmark<span class="fileInfo">$longDesc</span></div>
 <div class="mediaWarning">$warning</div>
 EOT
                                );
-                               // @codingStandardsIgnoreEnd
+                               // phpcs:enable
                        } else {
                                $out->addWikiText( <<<EOT
 <div class="fullMedia">{$medialink} {$dirmark}<span class="fileInfo">$longDesc</span>
index e7e7aa0..b871735 100644 (file)
@@ -96,10 +96,9 @@ class Parser {
        # at least one character of a host name (embeds EXT_LINK_URL_CLASS)
        const EXT_LINK_ADDR = '(?:[0-9.]+|\\[(?i:[0-9a-f:.]+)\\]|[^][<>"\\x00-\\x20\\x7F\p{Zs}\x{FFFD}])';
        # RegExp to make image URLs (embeds IPv6 part of EXT_LINK_ADDR)
-       // @codingStandardsIgnoreStart Generic.Files.LineLength
+       // phpcs:ignore Generic.Files.LineLength
        const EXT_IMAGE_REGEX = '/^(http:\/\/|https:\/\/)((?:\\[(?i:[0-9a-f:.]+)\\])?[^][<>"\\x00-\\x20\\x7F\p{Zs}\x{FFFD}]+)
                \\/([A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]+)\\.((?i)gif|png|jpg|jpeg)$/Sxu';
-       // @codingStandardsIgnoreEnd
 
        # Regular expression for a non-newline space
        const SPACE_NOT_NL = '(?:\t|&nbsp;|&\#0*160;|&\#[Xx]0*[Aa]0;|\p{Zs})';
@@ -2139,11 +2138,8 @@ class Parser {
 
                $useSubpages = $this->areSubpagesAllowed();
 
-               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                # Loop for each link
                for ( ; $line !== false && $line !== null; $a->next(), $line = $a->current() ) {
-                       // @codingStandardsIgnoreEnd
-
                        # Check for excessive memory usage
                        if ( $holders->isBig() ) {
                                # Too big
@@ -3577,9 +3573,8 @@ class Parser {
                $deps = [];
 
                # Loop to fetch the article, with up to 1 redirect
-               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $i = 0; $i < 2 && is_object( $title ); $i++ ) {
-                       // @codingStandardsIgnoreEnd
                        # Give extensions a chance to select the revision instead
                        $id = false; # Assume current
                        Hooks::run( 'BeforeParserFetchTemplateAndtitle',
@@ -4253,9 +4248,8 @@ class Parser {
                        $anchor = $safeHeadline;
                        $fallbackAnchor = $fallbackHeadline;
                        if ( isset( $refers[$arrayKey] ) ) {
-                               // @codingStandardsIgnoreStart
+                               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall,Generic.Formatting.DisallowMultipleStatements
                                for ( $i = 2; isset( $refers["${arrayKey}_$i"] ); ++$i );
-                               // @codingStandardsIgnoreEnd
                                $anchor .= "_$i";
                                $linkAnchor .= "_$i";
                                $refers["${arrayKey}_$i"] = true;
@@ -4263,9 +4257,8 @@ class Parser {
                                $refers[$arrayKey] = true;
                        }
                        if ( $fallbackHeadline !== false && isset( $refers[$fallbackArrayKey] ) ) {
-                               // @codingStandardsIgnoreStart
+                               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall,Generic.Formatting.DisallowMultipleStatements
                                for ( $i = 2; isset( $refers["${fallbackArrayKey}_$i"] ); ++$i );
-                               // @codingStandardsIgnoreEnd
                                $fallbackAnchor .= "_$i";
                                $refers["${fallbackArrayKey}_$i"] = true;
                        } else {
index 5368125..79021dd 100644 (file)
@@ -24,9 +24,8 @@
 /**
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class Preprocessor_DOM extends Preprocessor {
-       // @codingStandardsIgnoreEnd
 
        /**
         * @var Parser
@@ -1024,9 +1023,8 @@ class PPDPart {
  * An expansion frame, used as a context to expand the result of preprocessToObj()
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPFrame_DOM implements PPFrame {
-       // @codingStandardsIgnoreEnd
 
        /**
         * @var Preprocessor
@@ -1642,9 +1640,8 @@ class PPFrame_DOM implements PPFrame {
  * Expansion frame with template arguments
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPTemplateFrame_DOM extends PPFrame_DOM {
-       // @codingStandardsIgnoreEnd
 
        public $numberedArgs, $namedArgs;
 
@@ -1821,9 +1818,8 @@ class PPTemplateFrame_DOM extends PPFrame_DOM {
  * Expansion frame with custom arguments
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPCustomFrame_DOM extends PPFrame_DOM {
-       // @codingStandardsIgnoreEnd
 
        public $args;
 
@@ -1874,9 +1870,8 @@ class PPCustomFrame_DOM extends PPFrame_DOM {
 /**
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPNode_DOM implements PPNode {
-       // @codingStandardsIgnoreEnd
 
        /**
         * @var DOMElement
index 145fbbc..468b009 100644 (file)
@@ -39,9 +39,8 @@
  *
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class Preprocessor_Hash extends Preprocessor {
-       // @codingStandardsIgnoreEnd
 
        /**
         * @var Parser
@@ -789,9 +788,8 @@ class Preprocessor_Hash extends Preprocessor {
  * Stack class to help Preprocessor::preprocessToObj()
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPDStack_Hash extends PPDStack {
-       // @codingStandardsIgnoreEnd
 
        public function __construct() {
                $this->elementClass = 'PPDStackElement_Hash';
@@ -803,9 +801,8 @@ class PPDStack_Hash extends PPDStack {
 /**
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPDStackElement_Hash extends PPDStackElement {
-       // @codingStandardsIgnoreEnd
 
        public function __construct( $data = [] ) {
                $this->partClass = 'PPDPart_Hash';
@@ -857,9 +854,8 @@ class PPDStackElement_Hash extends PPDStackElement {
 /**
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPDPart_Hash extends PPDPart {
-       // @codingStandardsIgnoreEnd
 
        public function __construct( $out = '' ) {
                if ( $out !== '' ) {
@@ -875,9 +871,8 @@ class PPDPart_Hash extends PPDPart {
  * An expansion frame, used as a context to expand the result of preprocessToObj()
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPFrame_Hash implements PPFrame {
-       // @codingStandardsIgnoreEnd
 
        /**
         * @var Parser
@@ -1475,9 +1470,8 @@ class PPFrame_Hash implements PPFrame {
  * Expansion frame with template arguments
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPTemplateFrame_Hash extends PPFrame_Hash {
-       // @codingStandardsIgnoreEnd
 
        public $numberedArgs, $namedArgs, $parent;
        public $numberedExpansionCache, $namedExpansionCache;
@@ -1658,9 +1652,8 @@ class PPTemplateFrame_Hash extends PPFrame_Hash {
  * Expansion frame with custom arguments
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPCustomFrame_Hash extends PPFrame_Hash {
-       // @codingStandardsIgnoreEnd
 
        public $args;
 
@@ -1711,9 +1704,8 @@ class PPCustomFrame_Hash extends PPFrame_Hash {
 /**
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPNode_Hash_Tree implements PPNode {
-       // @codingStandardsIgnoreEnd
 
        public $name;
 
@@ -2059,9 +2051,8 @@ class PPNode_Hash_Tree implements PPNode {
 /**
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPNode_Hash_Text implements PPNode {
-       // @codingStandardsIgnoreEnd
 
        public $value;
        private $store, $index;
@@ -2130,9 +2121,8 @@ class PPNode_Hash_Text implements PPNode {
 /**
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPNode_Hash_Array implements PPNode {
-       // @codingStandardsIgnoreEnd
 
        public $value;
 
@@ -2188,9 +2178,8 @@ class PPNode_Hash_Array implements PPNode {
 /**
  * @ingroup Parser
  */
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPNode_Hash_Attr implements PPNode {
-       // @codingStandardsIgnoreEnd
 
        public $name, $value;
        private $store, $index;
index bd7072a..ba0b4cb 100644 (file)
@@ -209,9 +209,8 @@ abstract class PoolCounter {
        }
 }
 
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PoolCounter_Stub extends PoolCounter {
-       // @codingStandardsIgnoreEnd
 
        public function __construct() {
                /* No parameters needed */
index 65ea833..9515f25 100644 (file)
@@ -152,7 +152,7 @@ class PoolCounterRedis extends PoolCounter {
                }
                $conn = $status->value;
 
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                static $script =
                /** @lang Lua */
 <<<LUA
@@ -191,7 +191,7 @@ class PoolCounterRedis extends PoolCounter {
                end
                return 1
 LUA;
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
 
                try {
                        $conn->luaEval( $script,
index 2f0ea42..f887ada 100644 (file)
@@ -406,14 +406,12 @@ class Command {
                        // TODO replace with clear_last_error when requirements are bumped to PHP7
                        set_error_handler( function () {
                        }, 0 );
-                       // @codingStandardsIgnoreStart Generic.PHP.NoSilencedErrors.Discouraged
+                       // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                        @trigger_error( '' );
-                       // @codingStandardsIgnoreEnd
                        restore_error_handler();
 
-                       // @codingStandardsIgnoreStart Generic.PHP.NoSilencedErrors.Discouraged
+                       // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                        $numReadyPipes = @stream_select( $readyPipes, $emptyArray, $emptyArray, $timeout );
-                       // @codingStandardsIgnoreEnd
                        if ( $numReadyPipes === false ) {
                                $error = error_get_last();
                                if ( strncmp( $error['message'], $eintrMessage, strlen( $eintrMessage ) ) == 0 ) {
index 1ad1ab0..bd02fa3 100644 (file)
@@ -26,8 +26,7 @@ class SkinFallbackTemplate extends BaseTemplate {
 
                // Filter out skins that aren't installed
                $possibleSkins = array_filter( $possibleSkins, function ( $skinDir ) use ( $styleDirectory ) {
-                       return
-                               is_file( "$styleDirectory/$skinDir/skin.json" )
+                       return is_file( "$styleDirectory/$skinDir/skin.json" )
                                || is_file( "$styleDirectory/$skinDir/$skinDir.php" );
                } );
 
index 73b8128..33b9ccb 100644 (file)
@@ -700,9 +700,8 @@ abstract class QueryPage extends SpecialPage {
 
                        # $res might contain the whole 1,000 rows, so we read up to
                        # $num [should update this to use a Pager]
-                       // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+                       // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                        for ( $i = 0; $i < $num && $row = $res->fetchObject(); $i++ ) {
-                               // @codingStandardsIgnoreEnd
                                $line = $this->formatResult( $skin, $row );
                                if ( $line ) {
                                        $html[] = $this->listoutput
index eb0f0aa..9623953 100644 (file)
@@ -222,9 +222,8 @@ class SpecialEditTags extends UnlistedSpecialPage {
                $numRevisions = 0;
                // Live revisions...
                $list = $this->getList();
-               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $list->reset(); $list->current(); $list->next() ) {
-                       // @codingStandardsIgnoreEnd
                        $item = $list->current();
                        $numRevisions++;
                        $out->addHTML( $item->getHTML() );
@@ -310,9 +309,8 @@ class SpecialEditTags extends UnlistedSpecialPage {
                        // Otherwise, use a multi-select field for adding tags, and a list of
                        // checkboxes for removing them
 
-                       // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+                       // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                        for ( $list->reset(); $list->current(); $list->next() ) {
-                               // @codingStandardsIgnoreEnd
                                $currentTags = $list->current()->getTags();
                                if ( $currentTags ) {
                                        $tags = array_merge( $tags, explode( ',', $currentTags ) );
index eb7be51..78f9253 100644 (file)
@@ -533,9 +533,7 @@ class SpecialExport extends SpecialPage {
         * @return array
         */
        private function getPageLinks( $inputPages, $pageSet, $depth ) {
-               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                for ( ; $depth > 0; --$depth ) {
-                       // @codingStandardsIgnoreEnd
                        $pageSet = $this->getLinks(
                                $inputPages, $pageSet, 'pagelinks',
                                [ 'namespace' => 'pl_namespace', 'title' => 'pl_title' ],
index 32204f8..3559c99 100644 (file)
@@ -38,7 +38,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
 
        private $watchlistFilterGroupDefinition;
 
-       // @codingStandardsIgnoreStart Needed "useless" override to change parameters.
        public function __construct( $name = 'Recentchanges', $restriction = '' ) {
                parent::__construct( $name, $restriction );
 
@@ -134,7 +133,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                        }
                ];
        }
-       // @codingStandardsIgnoreEnd
 
        /**
         * Main execution point
index 8edebf2..aec21dc 100644 (file)
@@ -388,9 +388,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $numRevisions = 0;
                // Live revisions...
                $list = $this->getList();
-               // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $list->reset(); $list->current(); $list->next() ) {
-                       // @codingStandardsIgnoreEnd
                        $item = $list->current();
 
                        if ( !$item->canView() ) {
index 008573b..d80946a 100644 (file)
@@ -380,16 +380,12 @@ class ImageListPager extends TablePager {
                        }
                }
 
-               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                for ( ; $i < $limit && $topRes1; $i++ ) {
-                       // @codingStandardsIgnoreEnd
                        $resultArray[] = $topRes1;
                        $topRes1 = $res1->next();
                }
 
-               // @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
                for ( ; $i < $limit && $topRes2; $i++ ) {
-                       // @codingStandardsIgnoreEnd
                        $resultArray[] = $topRes2;
                        $topRes2 = $res2->next();
                }
index f5c8ee0..ddb4bba 100644 (file)
@@ -1663,9 +1663,8 @@ abstract class UploadBase {
                        # image/svg, text/xml, application/xml, and text/html, which can contain scripts
                        if ( $stripped == 'href' && strncasecmp( 'data:', $value, 5 ) === 0 ) {
                                // rfc2397 parameters. This is only slightly slower than (;[\w;]+)*.
-                               // @codingStandardsIgnoreStart Generic.Files.LineLength
+                               // phpcs:ignore Generic.Files.LineLength
                                $parameters = '(?>;[a-zA-Z0-9\!#$&\'*+.^_`{|}~-]+=(?>[a-zA-Z0-9\!#$&\'*+.^_`{|}~-]+|"(?>[\0-\x0c\x0e-\x21\x23-\x5b\x5d-\x7f]+|\\\\[\0-\x7f])*"))*(?:;base64)?';
-                               // @codingStandardsIgnoreEnd
 
                                if ( !preg_match( "!^data:\s*image/(gif|jpeg|jpg|png)$parameters,!i", $value ) ) {
                                        wfDebug( __METHOD__ . ": Found href to unwhitelisted data: uri "
index d12531b..a6783b0 100644 (file)
@@ -236,11 +236,10 @@ class AutoloadGenerator {
                }
 
                $output = implode( "\n\t", $content );
-               return
-                       <<<EOD
+               return <<<EOD
 <?php
 // This file is generated by $commandName, do not adjust manually
-// @codingStandardsIgnoreFile
+// phpcs:ignoreFile Generic.Files.LineLength
 global \${$this->variableName};
 
 \${$this->variableName} {$op} [
index bf59fe9..e236640 100644 (file)
@@ -107,10 +107,9 @@ class BasicSearchResultSetWidget {
         * @return string HTML
         */
        protected function header( Message $msg ) {
-               return
-                       "<h2>" .
-                               "<span class='mw-headline'>" . $msg->escaped() . "</span>" .
-                       "</h2>";
+               return "<h2>" .
+                       "<span class='mw-headline'>" . $msg->escaped() . "</span>" .
+               "</h2>";
        }
 
        /**
index 008ed19..2c88563 100644 (file)
@@ -153,10 +153,9 @@ class SearchFormWidget {
                        );
                }
 
-               return
-                               "<div class='search-types'>" .
-                                       "<ul>" . implode( '', $items ) . "</ul>" .
-                               "</div>";
+               return "<div class='search-types'>" .
+                       "<ul>" . implode( '', $items ) . "</ul>" .
+               "</div>";
        }
 
        /**
@@ -298,19 +297,18 @@ class SearchFormWidget {
                        );
                }
 
-               return
-                       "<fieldset id='mw-searchoptions'>" .
-                               "<legend>" . $this->specialSearch->msg( 'powersearch-legend' )->escaped() . '</legend>' .
-                               "<h4>" . $this->specialSearch->msg( 'powersearch-ns' )->parse() . '</h4>' .
-                               // populated by js if available
-                               "<div id='mw-search-togglebox'></div>" .
-                               $divider .
-                               implode(
-                                       $divider,
-                                       $showSections
-                               ) .
-                               $hidden .
-                               $remember .
-                       "</fieldset>";
+               return "<fieldset id='mw-searchoptions'>" .
+                       "<legend>" . $this->specialSearch->msg( 'powersearch-legend' )->escaped() . '</legend>' .
+                       "<h4>" . $this->specialSearch->msg( 'powersearch-ns' )->parse() . '</h4>' .
+                       // populated by js if available
+                       "<div id='mw-search-togglebox'></div>" .
+                       $divider .
+                       implode(
+                               $divider,
+                               $showSections
+                       ) .
+                       $hidden .
+                       $remember .
+               "</fieldset>";
        }
 }
index 4df2eb5..d6583a3 100644 (file)
@@ -74,13 +74,12 @@ class SimpleSearchResultSetWidget implements SearchResultSetWidget {
                        $out .= "</ul>";
                }
 
-               return
-                       "<div id='mw-search-interwiki'>" .
-                               "<div id='mw-search-interwiki-caption'>" .
-                                       $this->specialSearch->msg( 'search-interwiki-caption' )->parse() .
-                               '</div>' .
-                               $out .
-                       "</div>";
+               return "<div id='mw-search-interwiki'>" .
+                       "<div id='mw-search-interwiki-caption'>" .
+                               $this->specialSearch->msg( 'search-interwiki-caption' )->parse() .
+                       '</div>' .
+                       $out .
+               "</div>";
        }
 
        /**
@@ -108,10 +107,9 @@ class SimpleSearchResultSetWidget implements SearchResultSetWidget {
                        $this->specialSearch->msg( 'search-interwiki-more' )->escaped()
                );
 
-               return
-                       "<div class='mw-search-interwiki-project'>" .
-                               "<span class='mw-search-interwiki-more'>{$searchLink}</span>" .
-                               $caption .
+               return "<div class='mw-search-interwiki-project'>" .
+                       "<span class='mw-search-interwiki-more'>{$searchLink}</span>" .
+                       $caption .
                "</div>";
        }
 
index 743f77b..791ffb1 100644 (file)
--- a/index.php
+++ b/index.php
@@ -32,9 +32,8 @@
 
 // Bail on old versions of PHP, or if composer has not been run yet to install
 // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+.
-// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound
+// phpcs:ignore MediaWiki.Usage.DirUsage.FunctionFound
 require_once dirname( __FILE__ ) . '/includes/PHPVersionCheck.php';
-// @codingStandardsIgnoreEnd
 wfEntryPointCheck( 'index.php' );
 
 require __DIR__ . '/includes/WebStart.php';
index 467dc78..fdf2d05 100644 (file)
@@ -169,11 +169,10 @@ class Language {
         * Generated by UnicodeJS (see tools/strongDir) from the UCD; see
         * https://phabricator.wikimedia.org/diffusion/GUJS/ .
         */
-       // @codingStandardsIgnoreStart
        // @codeCoverageIgnoreStart
+       // phpcs:ignore Generic.Files.LineLength
        static private $strongDirRegex = '/(?:([\x{41}-\x{5a}\x{61}-\x{7a}\x{aa}\x{b5}\x{ba}\x{c0}-\x{d6}\x{d8}-\x{f6}\x{f8}-\x{2b8}\x{2bb}-\x{2c1}\x{2d0}\x{2d1}\x{2e0}-\x{2e4}\x{2ee}\x{370}-\x{373}\x{376}\x{377}\x{37a}-\x{37d}\x{37f}\x{386}\x{388}-\x{38a}\x{38c}\x{38e}-\x{3a1}\x{3a3}-\x{3f5}\x{3f7}-\x{482}\x{48a}-\x{52f}\x{531}-\x{556}\x{559}-\x{55f}\x{561}-\x{587}\x{589}\x{903}-\x{939}\x{93b}\x{93d}-\x{940}\x{949}-\x{94c}\x{94e}-\x{950}\x{958}-\x{961}\x{964}-\x{980}\x{982}\x{983}\x{985}-\x{98c}\x{98f}\x{990}\x{993}-\x{9a8}\x{9aa}-\x{9b0}\x{9b2}\x{9b6}-\x{9b9}\x{9bd}-\x{9c0}\x{9c7}\x{9c8}\x{9cb}\x{9cc}\x{9ce}\x{9d7}\x{9dc}\x{9dd}\x{9df}-\x{9e1}\x{9e6}-\x{9f1}\x{9f4}-\x{9fa}\x{a03}\x{a05}-\x{a0a}\x{a0f}\x{a10}\x{a13}-\x{a28}\x{a2a}-\x{a30}\x{a32}\x{a33}\x{a35}\x{a36}\x{a38}\x{a39}\x{a3e}-\x{a40}\x{a59}-\x{a5c}\x{a5e}\x{a66}-\x{a6f}\x{a72}-\x{a74}\x{a83}\x{a85}-\x{a8d}\x{a8f}-\x{a91}\x{a93}-\x{aa8}\x{aaa}-\x{ab0}\x{ab2}\x{ab3}\x{ab5}-\x{ab9}\x{abd}-\x{ac0}\x{ac9}\x{acb}\x{acc}\x{ad0}\x{ae0}\x{ae1}\x{ae6}-\x{af0}\x{af9}\x{b02}\x{b03}\x{b05}-\x{b0c}\x{b0f}\x{b10}\x{b13}-\x{b28}\x{b2a}-\x{b30}\x{b32}\x{b33}\x{b35}-\x{b39}\x{b3d}\x{b3e}\x{b40}\x{b47}\x{b48}\x{b4b}\x{b4c}\x{b57}\x{b5c}\x{b5d}\x{b5f}-\x{b61}\x{b66}-\x{b77}\x{b83}\x{b85}-\x{b8a}\x{b8e}-\x{b90}\x{b92}-\x{b95}\x{b99}\x{b9a}\x{b9c}\x{b9e}\x{b9f}\x{ba3}\x{ba4}\x{ba8}-\x{baa}\x{bae}-\x{bb9}\x{bbe}\x{bbf}\x{bc1}\x{bc2}\x{bc6}-\x{bc8}\x{bca}-\x{bcc}\x{bd0}\x{bd7}\x{be6}-\x{bf2}\x{c01}-\x{c03}\x{c05}-\x{c0c}\x{c0e}-\x{c10}\x{c12}-\x{c28}\x{c2a}-\x{c39}\x{c3d}\x{c41}-\x{c44}\x{c58}-\x{c5a}\x{c60}\x{c61}\x{c66}-\x{c6f}\x{c7f}\x{c82}\x{c83}\x{c85}-\x{c8c}\x{c8e}-\x{c90}\x{c92}-\x{ca8}\x{caa}-\x{cb3}\x{cb5}-\x{cb9}\x{cbd}-\x{cc4}\x{cc6}-\x{cc8}\x{cca}\x{ccb}\x{cd5}\x{cd6}\x{cde}\x{ce0}\x{ce1}\x{ce6}-\x{cef}\x{cf1}\x{cf2}\x{d02}\x{d03}\x{d05}-\x{d0c}\x{d0e}-\x{d10}\x{d12}-\x{d3a}\x{d3d}-\x{d40}\x{d46}-\x{d48}\x{d4a}-\x{d4c}\x{d4e}\x{d57}\x{d5f}-\x{d61}\x{d66}-\x{d75}\x{d79}-\x{d7f}\x{d82}\x{d83}\x{d85}-\x{d96}\x{d9a}-\x{db1}\x{db3}-\x{dbb}\x{dbd}\x{dc0}-\x{dc6}\x{dcf}-\x{dd1}\x{dd8}-\x{ddf}\x{de6}-\x{def}\x{df2}-\x{df4}\x{e01}-\x{e30}\x{e32}\x{e33}\x{e40}-\x{e46}\x{e4f}-\x{e5b}\x{e81}\x{e82}\x{e84}\x{e87}\x{e88}\x{e8a}\x{e8d}\x{e94}-\x{e97}\x{e99}-\x{e9f}\x{ea1}-\x{ea3}\x{ea5}\x{ea7}\x{eaa}\x{eab}\x{ead}-\x{eb0}\x{eb2}\x{eb3}\x{ebd}\x{ec0}-\x{ec4}\x{ec6}\x{ed0}-\x{ed9}\x{edc}-\x{edf}\x{f00}-\x{f17}\x{f1a}-\x{f34}\x{f36}\x{f38}\x{f3e}-\x{f47}\x{f49}-\x{f6c}\x{f7f}\x{f85}\x{f88}-\x{f8c}\x{fbe}-\x{fc5}\x{fc7}-\x{fcc}\x{fce}-\x{fda}\x{1000}-\x{102c}\x{1031}\x{1038}\x{103b}\x{103c}\x{103f}-\x{1057}\x{105a}-\x{105d}\x{1061}-\x{1070}\x{1075}-\x{1081}\x{1083}\x{1084}\x{1087}-\x{108c}\x{108e}-\x{109c}\x{109e}-\x{10c5}\x{10c7}\x{10cd}\x{10d0}-\x{1248}\x{124a}-\x{124d}\x{1250}-\x{1256}\x{1258}\x{125a}-\x{125d}\x{1260}-\x{1288}\x{128a}-\x{128d}\x{1290}-\x{12b0}\x{12b2}-\x{12b5}\x{12b8}-\x{12be}\x{12c0}\x{12c2}-\x{12c5}\x{12c8}-\x{12d6}\x{12d8}-\x{1310}\x{1312}-\x{1315}\x{1318}-\x{135a}\x{1360}-\x{137c}\x{1380}-\x{138f}\x{13a0}-\x{13f5}\x{13f8}-\x{13fd}\x{1401}-\x{167f}\x{1681}-\x{169a}\x{16a0}-\x{16f8}\x{1700}-\x{170c}\x{170e}-\x{1711}\x{1720}-\x{1731}\x{1735}\x{1736}\x{1740}-\x{1751}\x{1760}-\x{176c}\x{176e}-\x{1770}\x{1780}-\x{17b3}\x{17b6}\x{17be}-\x{17c5}\x{17c7}\x{17c8}\x{17d4}-\x{17da}\x{17dc}\x{17e0}-\x{17e9}\x{1810}-\x{1819}\x{1820}-\x{1877}\x{1880}-\x{18a8}\x{18aa}\x{18b0}-\x{18f5}\x{1900}-\x{191e}\x{1923}-\x{1926}\x{1929}-\x{192b}\x{1930}\x{1931}\x{1933}-\x{1938}\x{1946}-\x{196d}\x{1970}-\x{1974}\x{1980}-\x{19ab}\x{19b0}-\x{19c9}\x{19d0}-\x{19da}\x{1a00}-\x{1a16}\x{1a19}\x{1a1a}\x{1a1e}-\x{1a55}\x{1a57}\x{1a61}\x{1a63}\x{1a64}\x{1a6d}-\x{1a72}\x{1a80}-\x{1a89}\x{1a90}-\x{1a99}\x{1aa0}-\x{1aad}\x{1b04}-\x{1b33}\x{1b35}\x{1b3b}\x{1b3d}-\x{1b41}\x{1b43}-\x{1b4b}\x{1b50}-\x{1b6a}\x{1b74}-\x{1b7c}\x{1b82}-\x{1ba1}\x{1ba6}\x{1ba7}\x{1baa}\x{1bae}-\x{1be5}\x{1be7}\x{1bea}-\x{1bec}\x{1bee}\x{1bf2}\x{1bf3}\x{1bfc}-\x{1c2b}\x{1c34}\x{1c35}\x{1c3b}-\x{1c49}\x{1c4d}-\x{1c7f}\x{1cc0}-\x{1cc7}\x{1cd3}\x{1ce1}\x{1ce9}-\x{1cec}\x{1cee}-\x{1cf3}\x{1cf5}\x{1cf6}\x{1d00}-\x{1dbf}\x{1e00}-\x{1f15}\x{1f18}-\x{1f1d}\x{1f20}-\x{1f45}\x{1f48}-\x{1f4d}\x{1f50}-\x{1f57}\x{1f59}\x{1f5b}\x{1f5d}\x{1f5f}-\x{1f7d}\x{1f80}-\x{1fb4}\x{1fb6}-\x{1fbc}\x{1fbe}\x{1fc2}-\x{1fc4}\x{1fc6}-\x{1fcc}\x{1fd0}-\x{1fd3}\x{1fd6}-\x{1fdb}\x{1fe0}-\x{1fec}\x{1ff2}-\x{1ff4}\x{1ff6}-\x{1ffc}\x{200e}\x{2071}\x{207f}\x{2090}-\x{209c}\x{2102}\x{2107}\x{210a}-\x{2113}\x{2115}\x{2119}-\x{211d}\x{2124}\x{2126}\x{2128}\x{212a}-\x{212d}\x{212f}-\x{2139}\x{213c}-\x{213f}\x{2145}-\x{2149}\x{214e}\x{214f}\x{2160}-\x{2188}\x{2336}-\x{237a}\x{2395}\x{249c}-\x{24e9}\x{26ac}\x{2800}-\x{28ff}\x{2c00}-\x{2c2e}\x{2c30}-\x{2c5e}\x{2c60}-\x{2ce4}\x{2ceb}-\x{2cee}\x{2cf2}\x{2cf3}\x{2d00}-\x{2d25}\x{2d27}\x{2d2d}\x{2d30}-\x{2d67}\x{2d6f}\x{2d70}\x{2d80}-\x{2d96}\x{2da0}-\x{2da6}\x{2da8}-\x{2dae}\x{2db0}-\x{2db6}\x{2db8}-\x{2dbe}\x{2dc0}-\x{2dc6}\x{2dc8}-\x{2dce}\x{2dd0}-\x{2dd6}\x{2dd8}-\x{2dde}\x{3005}-\x{3007}\x{3021}-\x{3029}\x{302e}\x{302f}\x{3031}-\x{3035}\x{3038}-\x{303c}\x{3041}-\x{3096}\x{309d}-\x{309f}\x{30a1}-\x{30fa}\x{30fc}-\x{30ff}\x{3105}-\x{312d}\x{3131}-\x{318e}\x{3190}-\x{31ba}\x{31f0}-\x{321c}\x{3220}-\x{324f}\x{3260}-\x{327b}\x{327f}-\x{32b0}\x{32c0}-\x{32cb}\x{32d0}-\x{32fe}\x{3300}-\x{3376}\x{337b}-\x{33dd}\x{33e0}-\x{33fe}\x{3400}-\x{4db5}\x{4e00}-\x{9fd5}\x{a000}-\x{a48c}\x{a4d0}-\x{a60c}\x{a610}-\x{a62b}\x{a640}-\x{a66e}\x{a680}-\x{a69d}\x{a6a0}-\x{a6ef}\x{a6f2}-\x{a6f7}\x{a722}-\x{a787}\x{a789}-\x{a7ad}\x{a7b0}-\x{a7b7}\x{a7f7}-\x{a801}\x{a803}-\x{a805}\x{a807}-\x{a80a}\x{a80c}-\x{a824}\x{a827}\x{a830}-\x{a837}\x{a840}-\x{a873}\x{a880}-\x{a8c3}\x{a8ce}-\x{a8d9}\x{a8f2}-\x{a8fd}\x{a900}-\x{a925}\x{a92e}-\x{a946}\x{a952}\x{a953}\x{a95f}-\x{a97c}\x{a983}-\x{a9b2}\x{a9b4}\x{a9b5}\x{a9ba}\x{a9bb}\x{a9bd}-\x{a9cd}\x{a9cf}-\x{a9d9}\x{a9de}-\x{a9e4}\x{a9e6}-\x{a9fe}\x{aa00}-\x{aa28}\x{aa2f}\x{aa30}\x{aa33}\x{aa34}\x{aa40}-\x{aa42}\x{aa44}-\x{aa4b}\x{aa4d}\x{aa50}-\x{aa59}\x{aa5c}-\x{aa7b}\x{aa7d}-\x{aaaf}\x{aab1}\x{aab5}\x{aab6}\x{aab9}-\x{aabd}\x{aac0}\x{aac2}\x{aadb}-\x{aaeb}\x{aaee}-\x{aaf5}\x{ab01}-\x{ab06}\x{ab09}-\x{ab0e}\x{ab11}-\x{ab16}\x{ab20}-\x{ab26}\x{ab28}-\x{ab2e}\x{ab30}-\x{ab65}\x{ab70}-\x{abe4}\x{abe6}\x{abe7}\x{abe9}-\x{abec}\x{abf0}-\x{abf9}\x{ac00}-\x{d7a3}\x{d7b0}-\x{d7c6}\x{d7cb}-\x{d7fb}\x{e000}-\x{fa6d}\x{fa70}-\x{fad9}\x{fb00}-\x{fb06}\x{fb13}-\x{fb17}\x{ff21}-\x{ff3a}\x{ff41}-\x{ff5a}\x{ff66}-\x{ffbe}\x{ffc2}-\x{ffc7}\x{ffca}-\x{ffcf}\x{ffd2}-\x{ffd7}\x{ffda}-\x{ffdc}\x{10000}-\x{1000b}\x{1000d}-\x{10026}\x{10028}-\x{1003a}\x{1003c}\x{1003d}\x{1003f}-\x{1004d}\x{10050}-\x{1005d}\x{10080}-\x{100fa}\x{10100}\x{10102}\x{10107}-\x{10133}\x{10137}-\x{1013f}\x{101d0}-\x{101fc}\x{10280}-\x{1029c}\x{102a0}-\x{102d0}\x{10300}-\x{10323}\x{10330}-\x{1034a}\x{10350}-\x{10375}\x{10380}-\x{1039d}\x{1039f}-\x{103c3}\x{103c8}-\x{103d5}\x{10400}-\x{1049d}\x{104a0}-\x{104a9}\x{10500}-\x{10527}\x{10530}-\x{10563}\x{1056f}\x{10600}-\x{10736}\x{10740}-\x{10755}\x{10760}-\x{10767}\x{11000}\x{11002}-\x{11037}\x{11047}-\x{1104d}\x{11066}-\x{1106f}\x{11082}-\x{110b2}\x{110b7}\x{110b8}\x{110bb}-\x{110c1}\x{110d0}-\x{110e8}\x{110f0}-\x{110f9}\x{11103}-\x{11126}\x{1112c}\x{11136}-\x{11143}\x{11150}-\x{11172}\x{11174}-\x{11176}\x{11182}-\x{111b5}\x{111bf}-\x{111c9}\x{111cd}\x{111d0}-\x{111df}\x{111e1}-\x{111f4}\x{11200}-\x{11211}\x{11213}-\x{1122e}\x{11232}\x{11233}\x{11235}\x{11238}-\x{1123d}\x{11280}-\x{11286}\x{11288}\x{1128a}-\x{1128d}\x{1128f}-\x{1129d}\x{1129f}-\x{112a9}\x{112b0}-\x{112de}\x{112e0}-\x{112e2}\x{112f0}-\x{112f9}\x{11302}\x{11303}\x{11305}-\x{1130c}\x{1130f}\x{11310}\x{11313}-\x{11328}\x{1132a}-\x{11330}\x{11332}\x{11333}\x{11335}-\x{11339}\x{1133d}-\x{1133f}\x{11341}-\x{11344}\x{11347}\x{11348}\x{1134b}-\x{1134d}\x{11350}\x{11357}\x{1135d}-\x{11363}\x{11480}-\x{114b2}\x{114b9}\x{114bb}-\x{114be}\x{114c1}\x{114c4}-\x{114c7}\x{114d0}-\x{114d9}\x{11580}-\x{115b1}\x{115b8}-\x{115bb}\x{115be}\x{115c1}-\x{115db}\x{11600}-\x{11632}\x{1163b}\x{1163c}\x{1163e}\x{11641}-\x{11644}\x{11650}-\x{11659}\x{11680}-\x{116aa}\x{116ac}\x{116ae}\x{116af}\x{116b6}\x{116c0}-\x{116c9}\x{11700}-\x{11719}\x{11720}\x{11721}\x{11726}\x{11730}-\x{1173f}\x{118a0}-\x{118f2}\x{118ff}\x{11ac0}-\x{11af8}\x{12000}-\x{12399}\x{12400}-\x{1246e}\x{12470}-\x{12474}\x{12480}-\x{12543}\x{13000}-\x{1342e}\x{14400}-\x{14646}\x{16800}-\x{16a38}\x{16a40}-\x{16a5e}\x{16a60}-\x{16a69}\x{16a6e}\x{16a6f}\x{16ad0}-\x{16aed}\x{16af5}\x{16b00}-\x{16b2f}\x{16b37}-\x{16b45}\x{16b50}-\x{16b59}\x{16b5b}-\x{16b61}\x{16b63}-\x{16b77}\x{16b7d}-\x{16b8f}\x{16f00}-\x{16f44}\x{16f50}-\x{16f7e}\x{16f93}-\x{16f9f}\x{1b000}\x{1b001}\x{1bc00}-\x{1bc6a}\x{1bc70}-\x{1bc7c}\x{1bc80}-\x{1bc88}\x{1bc90}-\x{1bc99}\x{1bc9c}\x{1bc9f}\x{1d000}-\x{1d0f5}\x{1d100}-\x{1d126}\x{1d129}-\x{1d166}\x{1d16a}-\x{1d172}\x{1d183}\x{1d184}\x{1d18c}-\x{1d1a9}\x{1d1ae}-\x{1d1e8}\x{1d360}-\x{1d371}\x{1d400}-\x{1d454}\x{1d456}-\x{1d49c}\x{1d49e}\x{1d49f}\x{1d4a2}\x{1d4a5}\x{1d4a6}\x{1d4a9}-\x{1d4ac}\x{1d4ae}-\x{1d4b9}\x{1d4bb}\x{1d4bd}-\x{1d4c3}\x{1d4c5}-\x{1d505}\x{1d507}-\x{1d50a}\x{1d50d}-\x{1d514}\x{1d516}-\x{1d51c}\x{1d51e}-\x{1d539}\x{1d53b}-\x{1d53e}\x{1d540}-\x{1d544}\x{1d546}\x{1d54a}-\x{1d550}\x{1d552}-\x{1d6a5}\x{1d6a8}-\x{1d6da}\x{1d6dc}-\x{1d714}\x{1d716}-\x{1d74e}\x{1d750}-\x{1d788}\x{1d78a}-\x{1d7c2}\x{1d7c4}-\x{1d7cb}\x{1d800}-\x{1d9ff}\x{1da37}-\x{1da3a}\x{1da6d}-\x{1da74}\x{1da76}-\x{1da83}\x{1da85}-\x{1da8b}\x{1f110}-\x{1f12e}\x{1f130}-\x{1f169}\x{1f170}-\x{1f19a}\x{1f1e6}-\x{1f202}\x{1f210}-\x{1f23a}\x{1f240}-\x{1f248}\x{1f250}\x{1f251}\x{20000}-\x{2a6d6}\x{2a700}-\x{2b734}\x{2b740}-\x{2b81d}\x{2b820}-\x{2cea1}\x{2f800}-\x{2fa1d}\x{f0000}-\x{ffffd}\x{100000}-\x{10fffd}])|([\x{590}\x{5be}\x{5c0}\x{5c3}\x{5c6}\x{5c8}-\x{5ff}\x{7c0}-\x{7ea}\x{7f4}\x{7f5}\x{7fa}-\x{815}\x{81a}\x{824}\x{828}\x{82e}-\x{858}\x{85c}-\x{89f}\x{200f}\x{fb1d}\x{fb1f}-\x{fb28}\x{fb2a}-\x{fb4f}\x{10800}-\x{1091e}\x{10920}-\x{10a00}\x{10a04}\x{10a07}-\x{10a0b}\x{10a10}-\x{10a37}\x{10a3b}-\x{10a3e}\x{10a40}-\x{10ae4}\x{10ae7}-\x{10b38}\x{10b40}-\x{10e5f}\x{10e7f}-\x{10fff}\x{1e800}-\x{1e8cf}\x{1e8d7}-\x{1edff}\x{1ef00}-\x{1efff}\x{608}\x{60b}\x{60d}\x{61b}-\x{64a}\x{66d}-\x{66f}\x{671}-\x{6d5}\x{6e5}\x{6e6}\x{6ee}\x{6ef}\x{6fa}-\x{710}\x{712}-\x{72f}\x{74b}-\x{7a5}\x{7b1}-\x{7bf}\x{8a0}-\x{8e2}\x{fb50}-\x{fd3d}\x{fd40}-\x{fdcf}\x{fdf0}-\x{fdfc}\x{fdfe}\x{fdff}\x{fe70}-\x{fefe}\x{1ee00}-\x{1eeef}\x{1eef2}-\x{1eeff}]))/u';
        // @codeCoverageIgnoreEnd
-       // @codingStandardsIgnoreEnd
 
        /**
         * Get a cached or new language object for a given language code
@@ -3314,12 +3313,25 @@ class Language {
         */
        function commafy( $number ) {
                $digitGroupingPattern = $this->digitGroupingPattern();
+               $minimumGroupingDigits = $this->minimumGroupingDigits();
                if ( $number === null ) {
                        return '';
                }
 
                if ( !$digitGroupingPattern || $digitGroupingPattern === "###,###,###" ) {
-                       // default grouping is at thousands,  use the same for ###,###,### pattern too.
+                       // Default grouping is at thousands, use the same for ###,###,### pattern too.
+                       // In some languages it's conventional not to insert a thousands separator
+                       // in numbers that are four digits long (1000-9999).
+                       if ( $minimumGroupingDigits ) {
+                               // Number of '#' characters after last comma in the grouping pattern.
+                               // The pattern is hardcoded here, but this would vary for different patterns.
+                               $primaryGroupingSize = 3;
+                               // Maximum length of a number to suppress digit grouping for.
+                               $maximumLength = $minimumGroupingDigits + $primaryGroupingSize - 1;
+                               if ( preg_match( '/^\-?\d{1,' . $maximumLength . '}(\.\d+)?$/', $number ) ) {
+                                       return $number;
+                               }
+                       }
                        return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $number ) ) );
                } else {
                        // Ref: http://cldr.unicode.org/translation/number-patterns
@@ -3382,6 +3394,13 @@ class Language {
                return self::$dataCache->getItem( $this->mCode, 'separatorTransformTable' );
        }
 
+       /**
+        * @return int|null
+        */
+       function minimumGroupingDigits() {
+               return self::$dataCache->getItem( $this->mCode, 'minimumGroupingDigits' );
+       }
+
        /**
         * Take a list of strings and build a locale-friendly comma-separated
         * list, using the local comma-separator message.
@@ -4732,8 +4751,7 @@ class Language {
                }
 
                $dirmark = ( $oppositedm ? $this->getDirMark( true ) : '' ) . $this->getDirMark();
-               return
-                       $page .
+               return $page .
                        $dirmark .
                        $this->msg( 'word-separator' )->escaped() .
                        $this->msg( 'parentheses' )->rawParams( $details )->escaped();
index a84c4b8..f9631a1 100644 (file)
@@ -680,9 +680,8 @@ class LanguageConverter {
 
                $noScript = '<script.*?>.*?<\/script>(*SKIP)(*FAIL)';
                $noStyle = '<style.*?>.*?<\/style>(*SKIP)(*FAIL)';
-               // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
+               // phpcs:ignore Generic.Files.LineLength
                $noHtml = '<(?:[^>=]*+(?>[^>=]*+=\s*+(?:"[^"]*"|\'[^\']*\'|[^\'">\s]*+))*+[^>=]*+>|.*+)(*SKIP)(*FAIL)';
-               // @codingStandardsIgnoreEnd
                while ( $startPos < $length && $continue ) {
                        $continue = preg_match(
                                // Only match -{ outside of html.
index 6007bb4..1f9b767 100644 (file)
@@ -30,9 +30,8 @@
  * @ingroup Language
  * @see http://be-x-old.wikipedia.org/wiki/Project_talk:LanguageBe_tarask.php
  */
-// @codingStandardsIgnoreStart Ignore class name is not in camel caps format error
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class LanguageBe_tarask extends Language {
-       // @codingStandardsIgnoreEnd
        /**
         * The Belarusian language uses apostrophe sign,
         * but the characters used for this could be both U+0027 and U+2019.
@@ -54,20 +53,4 @@ class LanguageBe_tarask extends Language {
 
                return $s;
        }
-
-       /**
-        * Four-digit number should be without group commas (spaces)
-        * So "1 234 567", "12 345" but "1234"
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( preg_match( '/^-?\d{1,4}(\.\d*)?$/', $_ ) ) {
-                       return $_;
-               } else {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               }
-       }
 }
diff --git a/languages/classes/LanguageBg.php b/languages/classes/LanguageBg.php
deleted file mode 100644 (file)
index a592d02..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/**
- * Bulgarian (Български) specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Language
- */
-
-/**
- * Bulgarian (Български)
- *
- * @ingroup Language
- */
-class LanguageBg extends Language {
-       /**
-        * ISO number formatting: 123 456 789,99.
-        * Avoid tripple grouping by numbers with whole part up to 4 digits.
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
-}
diff --git a/languages/classes/LanguageEs.php b/languages/classes/LanguageEs.php
deleted file mode 100644 (file)
index 098148f..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/**
- * Spanish (español) specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Language
- */
-
-/**
- * Spanish (español)
- *
- * @ingroup Language
- */
-class LanguageEs extends Language {
-
-       /**
-        * @param string $_
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^-?\d{1,4}(\.\d+)?$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
-}
diff --git a/languages/classes/LanguageEt.php b/languages/classes/LanguageEt.php
deleted file mode 100644 (file)
index 759531b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/**
- * Estonian (eesti) specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Language
- */
-
-/**
- * Estonian (eesti)
- *
- * @ingroup Language
- */
-class LanguageEt extends Language {
-       /**
-        * Avoid grouping whole numbers between -9999 to 9999
-        * @param string $_
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^\-?\d{1,4}(\.\d+)?$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
-}
index 05b0ebe..602a589 100644 (file)
@@ -78,19 +78,4 @@ class LanguageHy extends Language {
                }
                return $word;
        }
-
-       /**
-        * Armenian numeric format is "12 345,67" but "1234,56"
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
 }
index 30abe25..57f9529 100644 (file)
@@ -75,19 +75,4 @@ class LanguageKaa extends Language {
                return parent::lcfirst( $string );
        }
 
-       /**
-        * Avoid grouping whole numbers between 0 to 9999
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
-
 }
index 39d19e7..7353a82 100644 (file)
@@ -26,9 +26,8 @@
  *
  * @ingroup Language
  */
-// @codingStandardsIgnoreStart Ignore class name is not in camel caps format error
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class LanguageKk_cyrl extends Language {
-       // @codingStandardsIgnoreEnd
        # Convert from the nominative form of a noun to some other case
        # Invoked with {{GRAMMAR:case|word}}
        /**
@@ -774,19 +773,4 @@ class LanguageKk_cyrl extends Language {
 
                return $lastLetter;
        }
-
-       /**
-        * Avoid grouping whole numbers between 0 to 9999
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
 }
index 9ef53e5..0185a03 100644 (file)
@@ -163,21 +163,6 @@ class LanguageKsh extends Language {
                return $word;
        }
 
-       /**
-        * Avoid grouping whole numbers between 0 to 9999
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       public function commafy( $_ ) {
-               if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
-
        /**
         * Handle cases of (1, other, 0) or (1, other)
         *
index c837409..ef77775 100644 (file)
@@ -227,7 +227,7 @@ class KuConverter extends LanguageConverter {
  *
  * @ingroup Language
  */
-class LanguageKu extends LanguageKu_ku {
+class LanguageKu extends Language {
 
        function __construct() {
                parent::__construct();
diff --git a/languages/classes/LanguageKu_ku.php b/languages/classes/LanguageKu_ku.php
deleted file mode 100644 (file)
index 4e9c365..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * Kurdish specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Language
- */
-
-/**
- * Kurdish
- *
- * @ingroup Language
- */
-// @codingStandardsIgnoreStart Ignore class name is not in camel caps format error
-class LanguageKu_ku extends Language {
-       // @codingStandardsIgnoreEnd
-       /**
-        * Avoid grouping whole numbers between 0 to 9999
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
-}
diff --git a/languages/classes/LanguagePl.php b/languages/classes/LanguagePl.php
deleted file mode 100644 (file)
index e0bf069..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/**
- * Polish (polski) specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Language
- */
-
-/**
- * Polish (polski)
- *
- * @ingroup Language
- */
-class LanguagePl extends Language {
-       /**
-        * @param string $_
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^\-?\d{1,4}(\.\d+)?$/', $_ ) ) {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               } else {
-                       return $_;
-               }
-       }
-}
diff --git a/languages/classes/LanguageRu.php b/languages/classes/LanguageRu.php
deleted file mode 100644 (file)
index 7b15721..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * Russian (русский язык) specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Language
- */
-
-/**
- * Russian (русский язык)
- *
- * You can contact:
- * Alexander Sigachov (alexander.sigachov at Googgle Mail)
- * Amir E. Aharoni (amir.aharoni@mail.huji.ac.il)
- *
- * @ingroup Language
- */
-class LanguageRu extends Language {
-       /**
-        * Four-digit number should be without group commas (spaces)
-        * See manual of style at https://ru.wikipedia.org/wiki/Википедия:Оформление_статей
-        * So "1 234 567", "12 345" but "1234"
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( preg_match( '/^-?\d{1,4}(\.\d*)?$/', $_ ) ) {
-                       return $_;
-               } else {
-                       return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
-               }
-       }
-}
diff --git a/languages/classes/LanguageUk.php b/languages/classes/LanguageUk.php
deleted file mode 100644 (file)
index a155d03..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * Ukrainian (українська мова) specific code.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Language
- */
-
-/**
- * Ukrainian (українська мова)
- *
- * @ingroup Language
- */
-class LanguageUk extends Language {
-       /**
-        * Ukrainian numeric format is "12 345,67" but "1234,56"
-        *
-        * @param string $_
-        *
-        * @return string
-        */
-       function commafy( $_ ) {
-               if ( !preg_match( '/^\-?\d{1,4}(\.\d+)?$/', $_ ) ) {
-                       return strrev( (string)preg_replace(
-                               '/(\d{3})(?=\d)(?!\d*\.)/',
-                               '$1,',
-                               strrev( $_ )
-                       ) );
-               } else {
-                       return $_;
-               }
-       }
-}
index 9d81c21..19c2d3a 100644 (file)
@@ -26,9 +26,8 @@
  *
  * @ingroup Language
  */
-// @codingStandardsIgnoreStart Ignore class name is not in camel caps format error
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class LanguageZh_hans extends Language {
-       // @codingStandardsIgnoreEnd
        /**
         * @return bool
         */
index 4761b87..5fdb581 100644 (file)
        "tag-mw-changed-redirect-target-description": "Праўкі, якія зьмяняюць мэту перанакіраваньня",
        "tag-mw-blank": "Ачыстка",
        "tag-mw-blank-description": "Праўкі, якія робяць старонку пустой",
+       "tag-mw-replace": "Заменена",
+       "tag-mw-replace-description": "Праўкі, якія выдаляюць больш за 90% зьместу старонкі",
        "tags-title": "Меткі",
        "tags-intro": "На гэтай старонцы знаходзіцца сьпіс метак, якімі праграмнае забесьпячэньне можа пазначыць рэдагаваньне, і іх значэньне.",
        "tags-tag": "Назва меткі",
index e9d3e62..f2fc49b 100644 (file)
        "tog-watchlisthideminor": "Kleine Bearbeitungen in der Beobachtungsliste ausblenden",
        "tog-watchlisthideliu": "Bearbeitungen angemeldeter Benutzer in der Beobachtungsliste ausblenden",
        "tog-watchlistreloadautomatically": "Sofern ein Filter geändert wurde, die Beobachtungsliste automatisch neu laden (erfordert JavaScript)",
-       "tog-watchlistunwatchlinks": "Direkte Links zum (Ent-)Beobachten bei Einträgen in der Beobachtungsliste hinzufügen (für diese Funktion ist JavaScript erforderlich)",
+       "tog-watchlistunwatchlinks": "Direkte Links zum Beobachten/Nicht beobachten bei den Einträgen in der Beobachtungsliste hinzufügen (erfordert JavaScript)",
        "tog-watchlisthideanons": "Bearbeitungen anonymer Benutzer (IP-Adressen) in der Beobachtungsliste ausblenden",
        "tog-watchlisthidepatrolled": "Kontrollierte Änderungen in der Beobachtungsliste ausblenden",
        "tog-watchlisthidecategorization": "Kategorisierungen von Seiten in der Beobachtungsliste ausblenden",
        "tog-showhiddencats": "Versteckte Kategorien anzeigen",
        "tog-norollbackdiff": "Unterschiede nach dem Zurücksetzen nicht anzeigen",
        "tog-useeditwarning": "Warnen, sofern eine zur Bearbeitung geöffnete Seite verlassen wird, die nicht gespeicherte Änderungen enthält",
-       "tog-prefershttps": "Während angemeldet, immer eine sichere Verbindung benutzen.",
+       "tog-prefershttps": "Stets eine sichere Verbindung benutzen, solange ich angemeldet bin",
        "underline-always": "immer",
        "underline-never": "nie",
        "underline-default": "abhängig von der Benutzeroberfläche oder Browsereinstellung",
        "newwindow": "(wird in einem neuen Fenster geöffnet)",
        "cancel": "Abbrechen",
        "moredotdotdot": "Mehr …",
-       "morenotlisted": "Diese Liste könnte nicht vollständig sein.",
+       "morenotlisted": "Diese Liste könnte unvollständig sein.",
        "mypage": "Eigene Seite",
        "mytalk": "Diskussion",
        "anontalk": "Diskussionsseite",
        "tool-link-userrights-readonly": "{{GENDER:$1|Benutzergruppen}} ansehen",
        "tool-link-emailuser": "E-Mail an {{GENDER:$1|diesen Benutzer|diese Benutzerin}} senden",
        "imagepage": "Dateiseite anzeigen",
-       "mediawikipage": "Meldungsseite anzeigen",
+       "mediawikipage": "Systemnachricht ansehen",
        "templatepage": "Vorlagenseite anzeigen",
        "viewhelppage": "Hilfeseite anzeigen",
        "categorypage": "Kategorieseite anzeigen",
        "jumpto": "Wechseln zu:",
        "jumptonavigation": "Navigation",
        "jumptosearch": "Suche",
-       "view-pool-error": "Entschuldigung, die Server sind im Moment überlastet.\nZu viele Benutzer versuchen, diese Seite zu besuchen.\nBitte warte einige Minuten, bevor du es noch einmal versuchst.\n\n$1",
-       "generic-pool-error": "Leider sind die Server derzeit überlastet.\nZu viele Benutzer wollen diese Ressource ansehen.\nBitte warte einen Moment, bevor du sie erneut aufrufst.",
+       "view-pool-error": "Entschuldige bitte, dass die Server im Moment überlastet sind.\nZu viele Benutzer versuchen, diese Seite zu besuchen.\nBitte warte einige Minuten, bevor du es noch einmal versuchst.\n\n$1",
+       "generic-pool-error": "Entschuldige bitte, dass die Server im Moment überlastet sind.\nZu viele Benutzer wollen diese Ressource ansehen.\nBitte warte einen Moment, bevor du sie erneut aufrufst.",
        "pool-timeout": "Zeitablauf während des Wartens auf die Sperrung",
        "pool-queuefull": "Poolwarteschlange ist voll",
        "pool-errorunknown": "Unbekannter Fehler",
        "pool-servererror": "Der Poolzählerdienst ist nicht verfügbar ($1).",
-       "poolcounter-usage-error": "Verwendungsfehler: $1",
+       "poolcounter-usage-error": "Anwendungsfehler: $1",
        "aboutsite": "Über {{SITENAME}}",
        "aboutpage": "Project:Über_{{SITENAME}}",
        "copyright": "Der Inhalt ist verfügbar unter der Lizenz $1, sofern nicht anders angegeben.",
index 028cf0e..bf75153 100644 (file)
        "recentchangesdays-max": "Enintään $1 {{PLURAL:$1|päivä|päivää}}",
        "recentchangescount": "Näytettävien muutoksien määrä oletuksena",
        "prefs-help-recentchangescount": "Tämä sisältää tuoreet muutokset, muutoshistoriat ja lokit.",
-       "prefs-help-watchlist-token2": "Tämä on salainen avain tarkkailulistasi verkkosyötteeseen.\nKuka tahansa, joka tietää sen voi lukea tarkkailulistaasi, joten älä paljasta sitä.\n[[Special:ResetTokens|Napsauta tästä, jos sinun pitää uudistaa se]].",
+       "prefs-help-watchlist-token2": "Tämä on salainen avain tarkkailulistasi verkkosyötteeseen.\nKuka tahansa, joka tietää sen voi lukea tarkkailulistaasi, joten älä paljasta sitä.\nJos sinun täytyy, [[Special:ResetTokens|voit uudistaa sen]].",
        "savedprefs": "Asetuksesi on tallennettu.",
        "savedrights": "Käyttäjän {{GENDER:$1|$1}} käyttäjäryhmät on tallennettu.",
        "timezonelegend": "Aikavyöhyke",
        "timezoneregion-indian": "Intian valtameri",
        "timezoneregion-pacific": "Tyynimeri",
        "allowemail": "Salli muiden käyttäjien lähettää minulle sähköpostia",
+       "email-allow-new-users-label": "Salli sähköpostit uusilta käyttäjiltä",
        "email-blacklist-label": "Estä näitä käyttäjiä lähettämästä minulle sähköpostia:",
        "prefs-searchoptions": "Haku",
        "prefs-namespaces": "Nimiavaruudet",
        "rcfilters-advancedfilters": "Kehittyneet suodattimet",
        "rcfilters-limit-title": "Näytettävät tulokset",
        "rcfilters-limit-and-date-label": "{{PLURAL:$1|muutos|$1 muutosta}}, $2",
+       "rcfilters-date-popup-title": "Aikajakso hakua varten",
        "rcfilters-days-title": "Viimeisimmät päivät",
        "rcfilters-hours-title": "Viimeisimmät tunnit",
        "rcfilters-days-show-days": "$1 {{PLURAL:$1|päivä|päivää}}",
        "rcfilters-filter-watchlist-notwatched-description": "Kaikki paitsi muutokset tarkkailulistallasi oleviin sivuihin.",
        "rcfilters-filtergroup-watchlistactivity": "Tarkkailulistan aktiivisuus",
        "rcfilters-filter-watchlistactivity-unseen-label": "Näkemättömät muutokset",
+       "rcfilters-filter-watchlistactivity-unseen-description": "Muutokset sivuihin, joilla et ole käynyt muutosten jälkeen.",
        "rcfilters-filter-watchlistactivity-seen-label": "Nähdyt muutokset",
+       "rcfilters-filter-watchlistactivity-seen-description": "Muutokset sivuihin, joilla olet käynyt muutosten jälkeen.",
        "rcfilters-filtergroup-changetype": "Muutoksen tyyppi",
        "rcfilters-filter-pageedits-label": "Sivun muokkaukset",
        "rcfilters-filter-pageedits-description": "Muokkaukset wikin sisältöön, keskusteluihin, luokkakuvauksiin…",
        "uploadstash-errclear": "Tiedostojen tyhjentäminen epäonnistui.",
        "uploadstash-refresh": "Päivitä tiedostoluettelo",
        "uploadstash-thumbnail": "näytä pienoiskuva",
+       "uploadstash-bad-path": "\nPolkua ei ole.",
+       "uploadstash-bad-path-invalid": "Polku ei kelpaa.",
+       "uploadstash-not-logged-in": "Käyttäjää ei ole kirjautunut sisään, tiedostojen on kuuluttava käyttäjille.",
+       "uploadstash-no-extension": "Laajennus on tyhjä.",
        "invalid-chunk-offset": "Kelpaamaton siirtymä lohkoissa",
        "img-auth-accessdenied": "Pääsy estetty",
        "img-auth-nopathinfo": "PATH_INFO puuttuu.\nPalvelintasi ei ole asetettu välittämään tätä tietoa.\nSe saattaa olla CGI-pohjainen eikä voi tukea img_authia.\nLisätietoja löytyy sivulta https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Merkkaus|Merkkaukset}}]]: $2)",
        "tag-mw-contentmodelchange": "sisältömallin muutos",
        "tag-mw-contentmodelchange-description": "Muokkaukset, jotka [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel muuttavat sivun sisältömallia]",
+       "tag-mw-new-redirect": "Uusi uudelleenohjaus",
+       "tag-mw-new-redirect-description": "Muokkaukset, jotka luovat uuden uudelleenohjauksen tai muuttavat sivun uudelleenohjaukseksi",
        "tag-mw-removed-redirect": "Ohjaus on poistettu",
+       "tag-mw-removed-redirect-description": "Muokkaukset, jotka muuttavat olemassa olevan uudelleenohjauksen ei-uudelleenohjaukseksi",
+       "tag-mw-changed-redirect-target": "Uudelleenohjauksen kohde muutettu",
+       "tag-mw-changed-redirect-target-description": "Muokkaukset, jotka muuttavat uudelleenohjauksen kohdetta",
+       "tag-mw-blank-description": "Muokkaukset, jotka tyhjentävät sivun",
+       "tag-mw-replace": "Korvattu",
+       "tag-mw-replace-description": "Muokkaukset, jotka poistavat yli 90% sivun sisällöstä",
+       "tag-mw-rollback": "Palautus",
+       "tag-mw-rollback-description": "Muokkaukset, jotka palauttavat edelliset muokkaukset takaisinvetolinkillä",
        "tag-mw-undo": "Kumoa",
+       "tag-mw-undo-description": "Muokkaukset, jotka kumoavat edelliset muokkaukset kumoamislinkillä",
        "tags-title": "Merkkaukset",
        "tags-intro": "Tämä sivu luetteloi ne merkkaukset (''engl.'' tags), joilla ohjelmisto voi merkitä muokkauksia, ja mitä ne tarkoittavat.",
        "tags-tag": "Merkkauksen nimi",
        "special-characters-group-thai": "Thai",
        "special-characters-group-lao": "Lao",
        "special-characters-group-khmer": "Khmer",
+       "special-characters-group-canadianaboriginal": "Kanadalainen aboriginaali",
        "special-characters-title-endash": "ajatusviiva",
        "special-characters-title-emdash": "pitkä ajatusviiva",
        "special-characters-title-minus": "miinusmerkki",
        "authmanager-userlogin-remembermypassword-help": "Tulisiko salasana muistaa istunnon kestoa pidempään.",
        "authmanager-username-help": "Käyttäjänimi varmentamiseen.",
        "authmanager-password-help": "Salasana varmentamiseen.",
+       "authmanager-domain-help": "Verkkonimi ulkoiselle todennukselle.",
        "authmanager-retype-help": "Salasana uudelleen vahvistaaksesi.",
        "authmanager-email-label": "Sähköposti",
        "authmanager-email-help": "Sähköpostiosoite",
        "authprovider-confirmlink-request-label": "Tunnukset, jotka tulisi yhdistää",
        "authprovider-confirmlink-success-line": "$1: Linkitetty onnistuneesti.",
        "authprovider-confirmlink-failed": "Tunnuksen linkitys ei onnistunut täysin: $1",
+       "authprovider-confirmlink-ok-help": "Jatka yhteydenottohäiriöilmoitusten näyttämisen jälkeen.",
        "authprovider-resetpass-skip-label": "Ohita",
        "authprovider-resetpass-skip-help": "Ohita salasanan palautus.",
        "authform-nosession-login": "Varmennus onnistui, mutta selaimesi ei pysty \"muistamaan\" sisäänkirjautumista.\n\n$1",
index 928250e..ace1bc7 100644 (file)
        "youremail": "Courriel :",
        "username": "{{GENDER:$1|Nom d'utilisateur|Nom d'utilisatrice}} :",
        "prefs-memberingroups": "{{GENDER:$2|Membre}} {{PLURAL:$1|du groupe|des groupes}} :",
+       "prefs-memberingroups-type": "$1",
        "group-membership-link-with-expiry": "$1 (jusqu'à $2)",
        "prefs-registration": "Date d'inscription :",
+       "prefs-registration-date-time": "$1",
        "yourrealname": "Nom réel :",
        "yourlanguage": "Langue :",
        "yourvariant": "Variante de la langue du contenu :",
        "apisandbox-request-selectformat-label": "Afficher les données de la requête comme :",
        "apisandbox-request-format-url-label": "Chaîne de requête de l’URL",
        "apisandbox-request-url-label": "Requête URL :",
+       "apisandbox-request-format-json-label": "JSON",
        "apisandbox-request-json-label": "Demander du JSON :",
        "apisandbox-request-time": "Durée de la demande: {{PLURAL:$1|$1 ms}}",
        "apisandbox-results-fixtoken": "Corrigez le jeton et renvoyez",
        "listgrants-summary": "Voici une liste des droits avec leur accès associé aux droits utilisateur. Les utilisateurs peuvent autoriser les applications à utiliser leur compte, mais avec des droits limités d’après les droits que l’utilisateur a donnés à l’application. Un application agissant au nom d’un utilisateur ne peut toutefois pas, de fait, utiliser des droits que l’utilisateur ne possède pas.\nIl peut y avoir [[{{MediaWiki:Listgrouprights-helppage}}|plus d’information]] sur les droits individuels.",
        "listgrants-grant": "Accorder",
        "listgrants-rights": "Droits",
+       "listgrants-grant-display": "$1 <code>($2)</code>",
        "trackingcategories": "Catégories de suivi",
        "trackingcategories-summary": "Cette page liste les catégories de suivi qui sont remplies automatiquement par [[MediaWiki]]. Leurs noms peuvent être changés en modifiant les messages systèmes correspondants dans l’espace de noms {{ns:8}}.",
        "trackingcategories-msg": "Catégorie de suivi",
index a79d9e6..189b327 100644 (file)
        "userrights-viewusergroup": "{{GENDER:$1|利用者}}グループ",
        "saveusergroups": "{{GENDER:$1|利用者}}グループを保存",
        "userrights-groupsmember": "所属グループ:",
-       "userrights-groupsmember-auto": "秘匿した所属グループ",
+       "userrights-groupsmember-auto": "自動的に所属するグループ:",
        "userrights-groupsmember-type": "$1",
        "userrights-groups-help": "この利用者が属するグループを変更できます。\n* チェックが入っているボックスは、この利用者がそのグループに属していることを意味します。\n* チェックが入っていないボックスは、この利用者がそのグループに属していないことを意味します。\n*「*」はグループに一旦追加した場合に除去 (あるいはその逆) ができないことを示しています。\n*「#」は有効期限の延長のみを行うことができるグループの参加資格を示します; 現在の期限よりも短縮することはできません。",
        "userrights-reason": "理由:",
        "recentchanges-submit": "表示",
        "rcfilters-tag-remove": "「$1」を除去",
        "rcfilters-legend-heading": "<strong>略語のリスト:</strong>",
+       "rcfilters-other-review-tools": "その他の監視ツール",
        "rcfilters-group-results-by-page": "ページごとにまとめて表示",
        "rcfilters-activefilters": "絞り込み",
        "rcfilters-advancedfilters": "詳細フィルター",
        "rcfilters-limit-title": "表示件数の変更",
+       "rcfilters-limit-and-date-label": "$1件の変更、$2",
        "rcfilters-date-popup-title": "検索期間",
        "rcfilters-days-title": "日数",
        "rcfilters-hours-title": "時間",
        "tag-mw-contentmodelchange-description": "ページの[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel コンテンツモデルを変更]する",
        "tag-mw-new-redirect": "新規リダイレクト",
        "tag-mw-new-redirect-description": "新たな転送ページの作成または既存ページの転送化の編集",
+       "tag-mw-removed-redirect": "転送廃止",
        "tag-mw-changed-redirect-target": "転送先変更",
        "tag-mw-changed-redirect-target-description": "転送先を変更する編集",
        "tag-mw-blank": "白紙化",
index af3411f..291ded5 100644 (file)
        "subject-preview": "Sujet kucken ouni ze späicheren:",
        "previewerrortext": "Beim Versuch fir Är Ännerungen ze weisen, ass e Feeler geschitt.",
        "blockedtitle": "Benotzer ass gespaart",
-       "blockedtext": "Äre Benotzernumm oder Är IP-Adress gouf gespaart.\n\nD'Spär gouf vum $1 gemaach. Als Grond gouf ''$2'' uginn.\n\n* Ufank vun der Spär: $8\n* Enn vun der Spär: $6\n* Spär betrëfft: $7\n\nDir kënnt den/d' $1 kontaktéieren oder ee vun den aneren [[{{MediaWiki:Grouppage-sysop}}|Administrateure]] fir iwwer d'Spär ze schwätzen.\n\nDëst sollt Dir besonnesch maachen, wann Dir d'Gefill hutt, datt de Grond fir d'Spären net bei Iech läit.\nD'Ursaach dofir ass an deem Fall, datt Dir eng dynamesch IP hutt, iwwer en Access-Provider, iwwer deen och aner Leit fueren.\nAus deem Grond ass et recommandéiert, sech e Benotzernumm zouzeleeën, fir all Mëssverständnes z'evitéieren.\n\nDir kënnt d'Funktioun \"Dësem Benotzer eng E-Mail schécken\" nëmme benotzen, wann Dir eng gëlteg E-Mail Adress bei Ären [[Special:Preferences|Astellungen]] aginn hutt.\nÄr aktuell IP-Adress ass $3 an d'Nummer vun der Spär ass #$5.\nSchreift all dës Informatioune w.e.g. bei all Ufro dobäi.",
+       "blockedtext": "Äre Benotzernumm oder Är IP-Adress gouf gespaart.\n\nD'Spär gouf vum $1 gemaach. Als Grond gouf ''$2'' uginn.\n\n* Ufank vun der Spär: $8\n* Enn vun der Spär: $6\n* Spär betrëfft: $7\n\nDir kënnt den/d' $1 kontaktéieren oder ee vun den aneren [[{{MediaWiki:Grouppage-sysop}}|Administrateure]] fir iwwer d'Spär ze schwätzen.\n\nDëst sollt Dir besonnesch maachen, wann Dir d'Gefill hutt, datt de Grond fir d'Spären net bei Iech läit.\nD'Ursaach dofir ass an deem Fall, datt Dir eng dynamesch IP hutt, iwwer en Access-Provider, iwwer deen och aner Leit fueren.\nAus deem Grond ass et recommandéiert, sech e Benotzernumm zouzeleeën, fir all Mëssverständnes z'evitéieren.\n\nDir kënnt d'Funktioun \"Dësem Benotzer eng E-Mail schécken\" nëmme benotzen, wann Dir eng gëlteg E-Mail Adress bei Ären [[Special:Preferences|Astellungen]] aginn hutt.\nÄr aktuell IP-Adress ass $3 an d'Nummer vun der Spär ass #$5.\nSchreift all dës Informatioune w.e.g. bei all Ufro derbäi.",
        "autoblockedtext": "Är IP-Adress gouf automatesch gespaart, well se vun engem anere Benotzer gebraucht gouf, an dee vum $1 gespaart gouf.\nDe Grond dofir war:\n\n:''$2''\n\n* Ufank vun der Spär: $8\n* Dauer vun der Spär: $6\n* D'Spär leeft of: $7\n\nDir kënnt de(n) $1 oder soss een [[{{MediaWiki:Grouppage-sysop}}|Administrateur]] kontaktéieren, fir iwwer déi Spär ze diskutéieren.\n\nBedenkt datt Dir d'Funktioun \"Dësem Benotzer eng E-Mail schécken\" benotze kënnt wann Dir eng gëlteg E-Mail-Adress an Ären [[Special:Preferences|Astellungen]] uginn hutt a wann dat net fir Iech gespaart gouf.\n\nÄr aktuell IP-Adress ass $3 an d'Nummer vun Ärer Spär ass $5.\nGitt dës Donnéeë w.e.g bei allen Ufroen zu dëser Spär un.",
        "blockednoreason": "Kee Grond uginn",
        "whitelistedittext": "Dir musst Iech $1, fir Säiten änneren ze kënnen.",
index a6fd58a..ee2bbb3 100644 (file)
@@ -236,6 +236,7 @@ $separatorTransformTable = [
        ',' => "\xc2\xa0", # nbsp
        '.' => ','
 ];
+$minimumGroupingDigits = 2;
 
 $linkTrail = '/^([абвгґджзеёжзійклмнопрстуўфхцчшыьэюяćčłńśšŭźža-z]+)(.*)$/sDu';
 
index 3a21e75..383a3cd 100644 (file)
@@ -218,3 +218,4 @@ $bookstoreList = [
 $linkTrail = '/^([a-zабвгдежзийклмнопрстуфхцчшщъыьэюя]+)(.*)$/sDu';
 
 $separatorTransformTable = [ ',' => "\xc2\xa0", '.' => ',' ];
+$minimumGroupingDigits = 2;
index d7a780e..16698d1 100644 (file)
@@ -299,4 +299,6 @@ $dateFormats = [
 ];
 
 $separatorTransformTable = [ ',' => "\xc2\xa0", '.' => ',' ];
+$minimumGroupingDigits = 2;
+
 $linkTrail = '/^([a-záéíóúñ]+)(.*)$/sDu';
index fcc12c9..d2f8f32 100644 (file)
@@ -259,6 +259,8 @@ $magicWords = [
 ];
 
 $separatorTransformTable = [ ',' => "\xc2\xa0", '.' => ',' ];
+$minimumGroupingDigits = 2;
+
 $linkTrail = '/^([äöõšüža-z]+)(.*)$/sDu';
 
 $datePreferences = [
index 9a5a809..34306d3 100644 (file)
@@ -12,6 +12,7 @@ $separatorTransformTable = [
        ',' => "\xc2\xa0", # nbsp
        '.' => ','
 ];
+$minimumGroupingDigits = 2;
 
 $fallback8bitEncoding = 'UTF-8';
 
index 52e8e77..2c7cb9e 100644 (file)
@@ -14,6 +14,7 @@ $separatorTransformTable = [
        ',' => "\xc2\xa0",
        '.' => ',',
 ];
+$minimumGroupingDigits = 2;
 
 $fallback8bitEncoding = 'windows-1254';
 
index 2857721..c559d02 100644 (file)
@@ -22,6 +22,7 @@ $separatorTransformTable = [
        ',' => "\xc2\xa0",
        '.' => ',',
 ];
+$minimumGroupingDigits = 2;
 
 $fallback8bitEncoding = 'windows-1251';
 
index 1fef838..291ed14 100644 (file)
@@ -95,6 +95,8 @@ $namespaceAliases = [
 ];
 
 $separatorTransformTable = [ ',' => "\xc2\xa0", '.' => ',' ];
+$minimumGroupingDigits = 2;
+
 $linkTrail = '/^([äöüėëijßəğåůæœça-z]+)(.*)$/sDu';
 
 // Remove German aliases
index 32844a2..c1bf76d 100644 (file)
@@ -51,6 +51,7 @@ $namespaceAliases = [
 ];
 
 $separatorTransformTable = [ ',' => '.', '.' => ',' ];
+$minimumGroupingDigits = 2;
 
 $specialPageAliases = [
        'Allmessages'               => [ 'Hemû_Peyam' ],
index 01a9d1a..1af008f 100644 (file)
@@ -119,10 +119,12 @@ $dateFormats = [
 ];
 
 $fallback8bitEncoding = 'iso-8859-2';
+
 $separatorTransformTable = [
        ',' => "\xc2\xa0", // T4749
        '.' => ','
 ];
+$minimumGroupingDigits = 2;
 
 $linkTrail = '/^([a-zęóąśłżźćńĘÓĄŚŁŻŹĆŃ]+)(.*)$/sDu';
 
index b5f310d..1abecad 100644 (file)
@@ -420,6 +420,7 @@ $separatorTransformTable = [
        ',' => "\xc2\xa0", # nbsp
        '.' => ','
 ];
+$minimumGroupingDigits = 2;
 
 $fallback8bitEncoding = 'windows-1251';
 $linkPrefixExtension = false;
index d851e1c..55bc1fc 100644 (file)
@@ -58,6 +58,7 @@ $separatorTransformTable = [
        ',' => "\xc2\xa0", # nbsp
        '.' => ','
 ];
+$minimumGroupingDigits = 2;
 
 $fallback8bitEncoding = 'windows-1251';
 $linkPrefixExtension = true;
index 3091de6..52b00f1 100644 (file)
@@ -37,7 +37,7 @@ class BenchUtf8TitleCheck extends Benchmarker {
        public function __construct() {
                parent::__construct();
 
-               // @codingStandardsIgnoreStart Ignore long line warnings.
+               // phpcs:disable Generic.Files.LineLength
                $this->data = [
                        "",
                        "United States of America", // 7bit ASCII
@@ -59,7 +59,7 @@ class BenchUtf8TitleCheck extends Benchmarker {
                        . "Sara%20Sidle%7CSofia%20Curtis%7CS%C3%A9rie%20t%C3%A9l%C3%A9vis%C3%A9e%7CWallace%20Langham%7C"
                        . "Warrick%20Brown%7CWendy%20Simms%7C%C3%89tats-Unis"
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
 
                $this->addDescription( "Benchmark for using a regexp vs. mb_check_encoding " .
                        "to check for UTF-8 encoding." );
index 206e046..3329958 100644 (file)
 
 require_once __DIR__ . '/Maintenance.php';
 
-// @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
-global $optionsWithArgs;
-global $optionsWithoutArgs;
-// @codingStandardsIgnoreEnd
+// phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
+global $optionsWithArgs, $optionsWithoutArgs;
+
 if ( !isset( $optionsWithArgs ) ) {
        $optionsWithArgs = [];
 }
@@ -36,9 +35,9 @@ if ( !isset( $optionsWithoutArgs ) ) {
 
 class CommandLineInc extends Maintenance {
        public function __construct() {
-               // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
+               // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
                global $optionsWithArgs, $optionsWithoutArgs;
-               // @codingStandardsIgnoreEnd
+
                parent::__construct();
                foreach ( $optionsWithArgs as $name ) {
                        $this->addOption( $name, '', false, true );
@@ -60,9 +59,9 @@ class CommandLineInc extends Maintenance {
        }
 
        public function execute() {
-               // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
+               // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
                global $args, $options;
-               // @codingStandardsIgnoreEnd
+
                $args = $this->mArgs;
                $options = $this->mOptions;
        }
index eceadc1..c3cbdeb 100644 (file)
@@ -83,9 +83,8 @@ class DeleteBatch extends Maintenance {
                $dbw = $this->getDB( DB_MASTER );
 
                # Handle each entry
-               // @codingStandardsIgnoreStart Ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $linenum = 1; !feof( $file ); $linenum++ ) {
-                       // @codingStandardsIgnoreEnd
                        $line = trim( fgets( $file ) );
                        if ( $line == '' ) {
                                continue;
index 2ac756c..ad75c6b 100644 (file)
@@ -62,7 +62,7 @@ if ( !defined( 'MW_CONFIG_CALLBACK' ) && !defined( 'MW_CONFIG_FILE' ) ) {
 // Custom setup for Maintenance entry point
 if ( !defined( 'MW_SETUP_CALLBACK' ) ) {
        function wfMaintenanceSetup() {
-               // @codingStandardsIgnoreLine MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
+               // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
                global $maintenance, $wgLocalisationCacheConf, $wgCacheDirectory;
                if ( $maintenance->getDbType() === Maintenance::DB_NONE ) {
                        if ( $wgLocalisationCacheConf['storeClass'] === false
index bed84a8..1be2a27 100644 (file)
@@ -484,8 +484,7 @@ class GenerateSitemap extends Maintenance {
         * @return string
         */
        function indexEntry( $filename ) {
-               return
-                       "\t<sitemap>\n" .
+               return "\t<sitemap>\n" .
                        "\t\t<loc>{$this->urlpath}$filename</loc>\n" .
                        "\t\t<lastmod>{$this->timestamp}</lastmod>\n" .
                        "\t</sitemap>\n";
@@ -518,8 +517,7 @@ class GenerateSitemap extends Maintenance {
         * @return string
         */
        function fileEntry( $url, $date, $priority ) {
-               return
-                       "\t<url>\n" .
+               return "\t<url>\n" .
                        // T36666: $url may contain bad characters such as ampersands.
                        "\t\t<loc>" . htmlspecialchars( $url ) . "</loc>\n" .
                        "\t\t<lastmod>$date</lastmod>\n" .
index 9e9fd3e..007ced1 100644 (file)
@@ -332,9 +332,8 @@ ENDS;
                        return $blacklist;
                }
 
-               // @codingStandardsIgnoreStart Ignore that globals should have a "wg" prefix.
+               // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
                global $checkBlacklist;
-               // @codingStandardsIgnoreEnd
 
                $blacklist = $checkBlacklist;
 
@@ -517,7 +516,7 @@ ENDS;
                $tableRows = implode( "\n|-\n", $rows );
 
                $version = SpecialVersion::getVersion( 'nodb' );
-               // @codingStandardsIgnoreStart Long line.
+               // phpcs:disable Generic.Files.LineLength
                echo <<<EOL
 '''Check results are for:''' <code>$version</code>
 
@@ -529,7 +528,7 @@ $tableRows
 $detailText
 
 EOL;
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index b749da4..7d85259 100644 (file)
@@ -52,9 +52,8 @@ class MergeMessageFileList extends Maintenance {
        }
 
        public function execute() {
-               // @codingStandardsIgnoreStart Ignore error: Global variable "$mmfl" is lacking 'wg' prefix
+               // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
                global $mmfl;
-               // @codingStandardsIgnoreEnd
                global $wgExtensionEntryPointListFiles;
 
                if ( !count( $wgExtensionEntryPointListFiles )
index fa25a06..9c53daa 100644 (file)
@@ -86,9 +86,8 @@ class MoveBatch extends Maintenance {
 
                # Setup complete, now start
                $dbw = $this->getDB( DB_MASTER );
-               // @codingStandardsIgnoreStart Ignore avoid function calls in a FOR loop test part warning
+               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                for ( $linenum = 1; !feof( $file ); $linenum++ ) {
-                       // @codingStandardsIgnoreEnd
                        $line = fgets( $file );
                        if ( $line === false ) {
                                break;
index 0ae46ae..4d56ef0 100644 (file)
@@ -361,10 +361,9 @@ class CompressOld extends Maintenance {
                                $usedChunk = false;
                                $primaryOldid = $revs[$i]->rev_text_id;
 
-                               // @codingStandardsIgnoreStart Ignore avoid function calls in a FOR loop test part warning
                                # Get the text of each revision and add it to the object
+                               // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
                                for ( $j = 0; $j < $thisChunkSize && $chunk->isHappy(); $j++ ) {
-                                       // @codingStandardsIgnoreEnd
                                        $oldid = $revs[$i + $j]->rev_text_id;
 
                                        # Get text
index 529c069..e60efdb 100755 (executable)
@@ -170,11 +170,9 @@ class UpdateMediaWiki extends Maintenance {
 
                $badPhpUnit = dirname( __DIR__ ) . '/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php';
                if ( file_exists( $badPhpUnit ) ) {
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
                        // Bad versions of the file are:
                        // https://raw.githubusercontent.com/sebastianbergmann/phpunit/c820f915bfae34e5a836f94967a2a5ea5ef34f21/src/Util/PHP/eval-stdin.php
                        // https://raw.githubusercontent.com/sebastianbergmann/phpunit/3aaddb1c5bd9b9b8d070b4cf120e71c36fd08412/src/Util/PHP/eval-stdin.php
-                       // @codingStandardsIgnoreEnd
                        $md5 = md5_file( $badPhpUnit );
                        if ( $md5 === '120ac49800671dc383b6f3709c25c099'
                                || $md5 === '28af792cb38fc9a1b236b91c1aad2876'
index 5692f11..eb8da57 100644 (file)
@@ -107,18 +107,16 @@ The new option is NOT validated.' );
 
                                $userValue = $user->getOption( $option );
                                if ( $userValue <> $defaultOptions[$option] ) {
-                                       // @codingStandardsIgnoreStart Ignore silencing errors is discouraged warning
+                                       // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                                        @$ret[$option][$userValue]++;
-                                       // @codingStandardsIgnoreEnd
                                }
                        } else {
 
                                foreach ( $defaultOptions as $name => $defaultValue ) {
                                        $userValue = $user->getOption( $name );
                                        if ( $userValue != $defaultValue ) {
-                                               // @codingStandardsIgnoreStart Ignore silencing errors is discouraged warning
+                                               // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                                                @$ret[$name][$userValue]++;
-                                               // @codingStandardsIgnoreEnd
                                        }
                                }
                        }
index 10b8d97..72cf654 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// @codingStandardsIgnoreFile Generic.Arrays.DisallowLongArraySyntax
+// phpcs:ignoreFile Generic.Arrays.DisallowLongArraySyntax
 /**
  * New version of MediaWiki web-based config/installation
  *
@@ -23,9 +23,8 @@
 
 // Bail on old versions of PHP, or if composer has not been run yet to install
 // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+.
-// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound
+// phpcs:ignore MediaWiki.Usage.DirUsage.FunctionFound
 require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php';
-// @codingStandardsIgnoreEnd
 wfEntryPointCheck( 'mw-config/index.php' );
 
 define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
index 83ae193..ca8c1bb 100644 (file)
@@ -168,9 +168,8 @@ if ( isset( $_REQUEST['expand'] ) ) {
        }
 }
 
-// @codingStandardsIgnoreStart
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class profile_point {
-       // @codingStandardsIgnoreEnd
 
        public $name;
        public $count;
@@ -222,7 +221,7 @@ class profile_point {
                                <?php echo htmlspecialchars( str_replace( ',', ', ', $this->name() ) ) . $extet ?>
                        </div>
                </th>
-               <?php //@codingStandardsIgnoreStart ?>
+               <?php // phpcs:disable Generic.Files.LineLength,Generic.PHP.NoSilencedErrors ?>
                <td class="mw-profileinfo-timep"><?php echo @wfPercent( $this->time() / self::$totaltime * 100 ); ?></td>
                <td class="mw-profileinfo-memoryp"><?php echo @wfPercent( $this->memory() / self::$totalmemory * 100 ); ?></td>
                <td class="mw-profileinfo-count"><?php echo $this->count(); ?></td>
@@ -231,7 +230,7 @@ class profile_point {
                <td class="mw-profileinfo-mpc"><?php echo round( sprintf( '%.2f', $this->memoryPerCall() / 1024 ), 2 ); ?></td>
                <td class="mw-profileinfo-tpr"><?php echo @round( sprintf( '%.2f', $this->time() / self::$totalcount ), 2 ); ?></td>
                <td class="mw-profileinfo-mpr"><?php echo @round( sprintf( '%.2f', $this->memory() / self::$totalcount / 1024 ), 2 ); ?></td>
-               <?php //@codingStandardsIgnoreEnd ?>
+               <?php // phpcs:enable ?>
        </tr>
                <?php
                if ( $ex ) {
@@ -258,33 +257,28 @@ class profile_point {
        }
 
        public function timePerCall() {
-               // @codingStandardsIgnoreStart
+               // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                return @( $this->time / $this->count );
-               // @codingStandardsIgnoreEnd
        }
 
        public function memoryPerCall() {
-               // @codingStandardsIgnoreStart
+               // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                return @( $this->memory / $this->count );
-               // @codingStandardsIgnoreEnd
        }
 
        public function callsPerRequest() {
-               // @codingStandardsIgnoreStart
+               // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                return @( $this->count / self::$totalcount );
-               // @codingStandardsIgnoreEnd
        }
 
        public function timePerRequest() {
-               // @codingStandardsIgnoreStart
+               // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                return @( $this->time / self::$totalcount );
-               // @codingStandardsIgnoreEnd
        }
 
        public function memoryPerRequest() {
-               // @codingStandardsIgnoreStart
+               // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
                return @( $this->memory / self::$totalcount );
-               // @codingStandardsIgnoreEnd
        }
 
        public function fmttime() {
@@ -293,9 +287,9 @@ class profile_point {
 };
 
 function compare_point( profile_point $a, profile_point $b ) {
-       // @codingStandardsIgnoreStart
+       // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
        global $sort;
-       // @codingStandardsIgnoreEnd
+
        switch ( $sort ) {
                case 'name':
                        return strcmp( $a->name(), $b->name() );
@@ -390,9 +384,8 @@ if ( isset( $_REQUEST['filter'] ) ) {
        profile_point::$totalmemory = 0.0;
 
        function getEscapedProfileUrl( $_filter = false, $_sort = false, $_expand = false ) {
-               // @codingStandardsIgnoreStart
+               // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
                global $filter, $sort, $expand;
-               // @codingStandardsIgnoreEnd
 
                if ( $_expand === false ) {
                        $_expand = $expand;
@@ -441,9 +434,8 @@ if ( isset( $_REQUEST['filter'] ) ) {
        }
        $points[] = $s;
 
-       // @codingStandardsIgnoreStart
+       // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
        @usort( $points, 'compare_point' );
-       // @codingStandardsIgnoreEnd
 
        foreach ( $points as $point ) {
                if ( strlen( $filter ) && !strstr( $point->name(), $filter ) ) {
index cbf4a15..a51008e 100644 (file)
@@ -24,7 +24,7 @@
 global $wgAutoloadClasses;
 $testDir = __DIR__ . "/..";
 
-// @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
+// phpcs:disable Generic.Files.LineLength
 $wgAutoloadClasses += [
 
        # tests/common
@@ -175,4 +175,4 @@ $wgAutoloadClasses += [
        'ParserTestFileSuite' => "$testDir/phpunit/suites/ParserTestFileSuite.php",
        'ParserTestTopLevelSuite' => "$testDir/phpunit/suites/ParserTestTopLevelSuite.php",
 ];
-// @codingStandardsIgnoreEnd
+// phpcs:enable
index 5bf50ea..5995012 100644 (file)
@@ -57,8 +57,7 @@ class ParserTestParserHook {
                        $parser->static_tag_buf = null;
                        return $tmp;
                } else { // wtf?
-                       return
-                               "\nCall this extension as <statictag>string</statictag> or as" .
+                       return "\nCall this extension as <statictag>string</statictag> or as" .
                                " <statictag action=flush/>, not in any other way.\n" .
                                "text: " . var_export( $in, true ) . "\n" .
                                "argv: " . var_export( $argv, true ) . "\n";
index a9704e6..cb430f2 100644 (file)
@@ -419,8 +419,7 @@ class ParserEditTests extends Maintenance {
                        print "Wrote updated file\n";
                } else {
                        print "Cannot write updated file, here is a patch you can paste:\n\n";
-                       print
-                               "--- {$fileName}\n" .
+                       print "--- {$fileName}\n" .
                                "+++ {$fileName}~\n" .
                                $this->unifiedDiff( $text, $result ) .
                                "\n";
index 79feaa0..364ebda 100644 (file)
@@ -16,7 +16,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-// @codingStandardsIgnoreFile
+// phpcs:ignoreFile
 
 /**
  * @param callable $callback
index 7cd9016..ba1efb9 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Minimal set of classes necessary for UserMailer to be happy. Types
  * taken from documentation at pear.php.net.
- * @codingStandardsIgnoreFile
+ * phpcs:ignoreFile
  */
 
 class PEAR {
index ee47937..0f8859d 100644 (file)
@@ -5,7 +5,7 @@
  * that they are optional. Phan can not detect this and thus throws an error for a usage with
  * no params. So we have this small stub just for the constructor to allow no params.
  * @see https://secure.php.net/manual/en/memcached.construct.php
- * @codingStandardsIgnoreFile
+ * phpcs:ignoreFile
  */
 
 class Memcached {
index 1372219..34ac735 100644 (file)
@@ -2,7 +2,7 @@
 
 /**
  * Minimal set of classes necessary for Xhprof using tideways
- * @codingStandardsIgnoreFile
+ * phpcs:ignoreFile
  */
 
 function tideways_enable(){
index 1015b0b..bd4ed63 100644 (file)
@@ -16,7 +16,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-// @codingStandardsIgnoreFile
+// phpcs:ignoreFile
 
 /**
  * @param string $text1
index f4844f8..7f42254 100644 (file)
@@ -133,7 +133,7 @@ class LinkerTest extends MediaWikiLangTestCase {
        public function provideCasesForFormatComment() {
                $wikiId = 'enwiki'; // $wgConf has a fake entry for this
 
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // Linker::formatComment
                        [
@@ -257,7 +257,7 @@ class LinkerTest extends MediaWikiLangTestCase {
                                false, false, $wikiId
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
@@ -289,7 +289,7 @@ class LinkerTest extends MediaWikiLangTestCase {
        }
 
        public static function provideCasesForFormatLinksInComment() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                'foo bar <a href="/wiki/Special:BlankPage" title="Special:BlankPage">Special:BlankPage</a>',
@@ -312,43 +312,43 @@ class LinkerTest extends MediaWikiLangTestCase {
                                'enwiki',
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        public static function provideLinkBeginHook() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // Modify $html
                        [
-                               function( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
+                               function ( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
                                        $html = 'foobar';
                                },
                                '<a href="/wiki/Special:BlankPage" title="Special:BlankPage">foobar</a>'
                        ],
                        // Modify $attribs
                        [
-                               function( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
+                               function ( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
                                        $attribs['bar'] = 'baz';
                                },
                                '<a href="/wiki/Special:BlankPage" title="Special:BlankPage" bar="baz">Special:BlankPage</a>'
                        ],
                        // Modify $query
                        [
-                               function( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
+                               function ( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
                                        $query['bar'] = 'baz';
                                },
                                '<a href="/w/index.php?title=Special:BlankPage&amp;bar=baz" title="Special:BlankPage">Special:BlankPage</a>'
                        ],
                        // Force HTTP $options
                        [
-                               function( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
+                               function ( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
                                        $options = [ 'http' ];
                                },
                                '<a href="http://example.org/wiki/Special:BlankPage" title="Special:BlankPage">Special:BlankPage</a>'
                        ],
                        // Force 'forcearticlepath' in $options
                        [
-                               function( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
+                               function ( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
                                        $options = [ 'forcearticlepath' ];
                                        $query['foo'] = 'bar';
                                },
@@ -356,14 +356,14 @@ class LinkerTest extends MediaWikiLangTestCase {
                        ],
                        // Abort early
                        [
-                               function( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
+                               function ( $dummy, $title, &$html, &$attribs, &$query, &$options, &$ret ) {
                                        $ret = 'foobar';
                                        return false;
                                },
                                'foobar'
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index c348834..44b9707 100644 (file)
@@ -274,7 +274,7 @@ class OutputPageTest extends MediaWikiTestCase {
        }
 
        public static function provideMakeResourceLoaderLink() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // Single only=scripts load
                        [
@@ -297,7 +297,7 @@ class OutputPageTest extends MediaWikiTestCase {
                                        . "});</script>"
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
@@ -345,6 +345,7 @@ class OutputPageTest extends MediaWikiTestCase {
        }
 
        public static function provideBuildExemptModules() {
+               // phpcs:disable Generic.Files.LineLength
                return [
                        'empty' => [
                                'exemptStyleModules' => [],
@@ -354,7 +355,6 @@ class OutputPageTest extends MediaWikiTestCase {
                                'exemptStyleModules' => [ 'site' => [], 'noscript' => [], 'private' => [], 'user' => [] ],
                                '<meta name="ResourceLoaderDynamicStyles" content=""/>',
                        ],
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength
                        'default logged-out' => [
                                'exemptStyleModules' => [ 'site' => [ 'site.styles' ] ],
                                '<meta name="ResourceLoaderDynamicStyles" content=""/>' . "\n" .
@@ -377,8 +377,8 @@ class OutputPageTest extends MediaWikiTestCase {
                                '<link rel="stylesheet" href="/w/load.php?debug=false&amp;lang=en&amp;modules=example.user&amp;only=styles&amp;skin=fallback&amp;version=0a56zyi"/>' . "\n" .
                                '<link rel="stylesheet" href="/w/load.php?debug=false&amp;lang=en&amp;modules=user.styles&amp;only=styles&amp;skin=fallback&amp;version=1e9z0ox"/>',
                        ],
-                       // @codingStandardsIgnoreEnd Generic.Files.LineLength
                ];
+               // phpcs:enable
        }
 
        /**
index 67364cb..fc6a70b 100644 (file)
@@ -236,7 +236,7 @@ class PathRouterTest extends MediaWikiTestCase {
         * Ensure the router doesn't choke on long paths.
         */
        public function testLength() {
-               // @codingStandardsIgnoreStart Ignore long line warnings
+               // phpcs:disable Generic.Files.LineLength
                $matches = $this->basicRouter->parse(
                        "/wiki/Lorem_ipsum_dolor_sit_amet,_consectetur_adipisicing_elit,_sed_do_eiusmod_tempor_incididunt_ut_labore_et_dolore_magna_aliqua._Ut_enim_ad_minim_veniam,_quis_nostrud_exercitation_ullamco_laboris_nisi_ut_aliquip_ex_ea_commodo_consequat._Duis_aute_irure_dolor_in_reprehenderit_in_voluptate_velit_esse_cillum_dolore_eu_fugiat_nulla_pariatur._Excepteur_sint_occaecat_cupidatat_non_proident,_sunt_in_culpa_qui_officia_deserunt_mollit_anim_id_est_laborum."
                );
@@ -244,7 +244,7 @@ class PathRouterTest extends MediaWikiTestCase {
                        $matches,
                        [ 'title' => "Lorem_ipsum_dolor_sit_amet,_consectetur_adipisicing_elit,_sed_do_eiusmod_tempor_incididunt_ut_labore_et_dolore_magna_aliqua._Ut_enim_ad_minim_veniam,_quis_nostrud_exercitation_ullamco_laboris_nisi_ut_aliquip_ex_ea_commodo_consequat._Duis_aute_irure_dolor_in_reprehenderit_in_voluptate_velit_esse_cillum_dolore_eu_fugiat_nulla_pariatur._Excepteur_sint_occaecat_cupidatat_non_proident,_sunt_in_culpa_qui_officia_deserunt_mollit_anim_id_est_laborum." ]
                );
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index 31eebe3..c0930e3 100644 (file)
@@ -57,12 +57,12 @@ class SampleTest extends MediaWikiLangTestCase {
                ];
        }
 
-       // @codingStandardsIgnoreStart Generic.Files.LineLength
        /**
+        * phpcs:disable Generic.Files.LineLength
         * @dataProvider provideTitles
         * See https://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.dataProvider
+        * phpcs:enable
         */
-       // @codingStandardsIgnoreEnd
        public function testCreateBasicListOfTitles( $titleName, $ns, $text ) {
                $title = Title::newFromText( $titleName, $ns );
                $this->assertEquals( $text, "$title", "see if '$titleName' matches '$text'" );
@@ -95,12 +95,10 @@ class SampleTest extends MediaWikiLangTestCase {
                $this->assertTrue( $title->isLocal() );
        }
 
-       // @codingStandardsIgnoreStart Generic.Files.LineLength
        /**
         * @expectedException InvalidArgumentException
         * See https://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.expectedException
         */
-       // @codingStandardsIgnoreEnd
        public function testTitleObjectFromObject() {
                $title = Title::newFromText( Title::newFromText( "test" ) );
                $this->assertEquals( "Test", $title->isLocal() );
index 9399ef8..155a08e 100644 (file)
@@ -151,8 +151,8 @@ class ApiComparePagesTest extends ApiTestCase {
        }
 
        public static function provideDiff() {
+               // phpcs:disable Generic.Files.LineLength.TooLong
                return [
-                       // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
                        'Basic diff, titles' => [
                                [
                                        'fromtitle' => 'ApiComparePagesTest A',
@@ -604,8 +604,7 @@ class ApiComparePagesTest extends ApiTestCase {
                                [],
                                'missingcontent'
                        ],
-
-                       // @codingStandardsIgnoreEnd
                ];
+               // phpcs:enable
        }
 }
index 3aa1db3..2d2e29b 100644 (file)
@@ -20,7 +20,7 @@ class ApiFormatPhpTest extends ApiFormatTestBase {
        }
 
        public static function provideGeneralEncoding() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return array_merge(
                        self::addFormatVersion( 1, [
                                // Basic types
@@ -97,7 +97,7 @@ class ApiFormatPhpTest extends ApiFormatTestBase {
                                        'a:1:{s:3:"foo";s:3:"foo";}' ],
                        ] )
                );
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        public function testCrossDomainMangling() {
index 0f8c8ee..915fb5c 100644 (file)
@@ -12,11 +12,11 @@ class ApiFormatXmlTest extends ApiFormatTestBase {
        public static function setUpBeforeClass() {
                parent::setUpBeforeClass();
                $page = WikiPage::factory( Title::newFromText( 'MediaWiki:ApiFormatXmlTest.xsl' ) );
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                $page->doEditContent( new WikitextContent(
                        '<?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />'
                ), 'Summary' );
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
                $page = WikiPage::factory( Title::newFromText( 'MediaWiki:ApiFormatXmlTest' ) );
                $page->doEditContent( new WikitextContent( 'Bogus' ), 'Summary' );
                $page = WikiPage::factory( Title::newFromText( 'ApiFormatXmlTest' ) );
@@ -24,7 +24,7 @@ class ApiFormatXmlTest extends ApiFormatTestBase {
        }
 
        public static function provideGeneralEncoding() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // Basic types
                        [ [ null, 'a' => null ], '<?xml version="1.0"?><api><_v _idx="0" /></api>' ],
@@ -117,7 +117,7 @@ class ApiFormatXmlTest extends ApiFormatTestBase {
                                        '" type="text/xsl" ?><api />',
                                [ 'xslt' => 'MediaWiki:ApiFormatXmlTest.xsl' ] ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
 }
index 465a9d1..6190516 100644 (file)
@@ -4,12 +4,12 @@
  * @covers ChangesListFilterGroup
  */
 class ChangesListFilterGroupTest extends MediaWikiTestCase {
-       // @codingStandardsIgnoreStart
        /**
+        * phpcs:disable Generic.Files.LineLength
         * @expectedException MWException
         * @expectedExceptionMessage Group names may not contain '_'.  Use the naming convention: 'camelCase'
+        * phpcs:enable
         */
-       // @codingStandardsIgnoreEnd
        public function testReservedCharacter() {
                new MockChangesListFilterGroup(
                        [
index 811c8c2..039658e 100644 (file)
@@ -25,12 +25,12 @@ class ChangesListFilterTest extends MediaWikiTestCase {
                );
        }
 
-       // @codingStandardsIgnoreStart
        /**
+        * phpcs:disable Generic.Files.LineLength
         * @expectedException MWException
         * @expectedExceptionMessage Filter names may not contain '_'.  Use the naming convention: 'lowercase'
+        * phpcs:enable
         */
-       // @codingStandardsIgnoreEnd
        public function testReservedCharacter() {
                $filter = new MockChangesListFilter(
                        [
@@ -41,12 +41,10 @@ class ChangesListFilterTest extends MediaWikiTestCase {
                );
        }
 
-       // @codingStandardsIgnoreStart
        /**
         * @expectedException MWException
         * @expectedExceptionMessage Two filters in a group cannot have the same name: 'somename'
         */
-       // @codingStandardsIgnoreEnd
        public function testDuplicateName() {
                new MockChangesListFilter(
                        [
index d92fb8f..8f178de 100644 (file)
@@ -21,7 +21,7 @@ class CssContentHandlerTest extends MediaWikiLangTestCase {
         * Keep this in sync with CssContentTest::provideGetRedirectTarget()
         */
        public static function provideMakeRedirectContent() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                'MediaWiki:MonoBook.css',
@@ -36,6 +36,6 @@ class CssContentHandlerTest extends MediaWikiLangTestCase {
                                "/* #REDIRECT */@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);"
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 }
index 1e82fdd..f5cc05e 100644 (file)
@@ -101,7 +101,7 @@ class CssContentTest extends JavaScriptContentTest {
         * Keep this in sync with CssContentHandlerTest::provideMakeRedirectContent()
         */
        public static function provideGetRedirectTarget() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [ 'MediaWiki:MonoBook.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=MediaWiki:MonoBook.css&action=raw&ctype=text/css);" ],
                        [ 'User:FooBar/common.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=User:FooBar/common.css&action=raw&ctype=text/css);" ],
@@ -111,7 +111,7 @@ class CssContentTest extends JavaScriptContentTest {
                        # Wrong domain
                        [ null, "/* #REDIRECT */@import url(//example.com/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        public static function dataEquals() {
index d229623..080ec96 100644 (file)
@@ -21,7 +21,7 @@ class JavaScriptContentHandlerTest extends MediaWikiLangTestCase {
         * Keep this in sync with JavaScriptContentTest::provideGetRedirectTarget()
         */
        public static function provideMakeRedirectContent() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                'MediaWiki:MonoBook.js',
@@ -36,6 +36,6 @@ class JavaScriptContentHandlerTest extends MediaWikiLangTestCase {
                                '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=Gadget:FooBaz.js\u0026action=raw\u0026ctype=text/javascript");'
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 }
index 434e17c..6656fa4 100644 (file)
@@ -251,19 +251,18 @@ class JavaScriptContentTest extends TextContentTest {
        }
 
        public static function provideUpdateRedirect() {
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                '#REDIRECT [[Someplace]]',
                                '#REDIRECT [[Someplace]]',
                        ],
-
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength
                        [
                                '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=MediaWiki:MonoBook.js\u0026action=raw\u0026ctype=text/javascript");',
                                '/* #REDIRECT */mw.loader.load("//example.org/w/index.php?title=TestUpdateRedirect_target\u0026action=raw\u0026ctype=text/javascript");'
                        ]
-                       // @codingStandardsIgnoreEnd
                ];
+               // phpcs:enable
        }
 
        /**
@@ -313,7 +312,7 @@ class JavaScriptContentTest extends TextContentTest {
         * Keep this in sync with JavaScriptContentHandlerTest::provideMakeRedirectContent()
         */
        public static function provideGetRedirectTarget() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                'MediaWiki:MonoBook.js',
@@ -338,6 +337,6 @@ class JavaScriptContentTest extends TextContentTest {
                                '/* #REDIRECT */mw.loader.load("//example.com/w/index.php?title=MediaWiki:OtherWiki.js\u0026action=raw\u0026ctype=text/javascript");'
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 }
index 347d0fc..7bb03db 100644 (file)
@@ -37,7 +37,7 @@ class ImportTest extends MediaWikiLangTestCase {
        }
 
        public function getUnknownTagsXML() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                <<< EOF
@@ -71,7 +71,7 @@ EOF
                                'TestImportPage'
                        ]
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
@@ -102,7 +102,7 @@ EOF
        }
 
        public function getRedirectXML() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                <<< EOF
@@ -157,7 +157,7 @@ EOF
                                null
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
@@ -185,7 +185,7 @@ EOF
        }
 
        public function getSiteInfoXML() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                <<< EOF
@@ -217,7 +217,7 @@ EOF
                                ]
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
@@ -248,7 +248,7 @@ EOF
 
                $n = ( $assign ? 1 : 0 ) + ( $create ? 2 : 0 );
 
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                $source = $this->getDataSource( <<<EOF
 <mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
   <page>
@@ -283,7 +283,7 @@ EOF
 </mediawiki>
 EOF
                );
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
 
                $importer = new WikiImporter( $source, MediaWikiServices::getInstance()->getMainConfig() );
                $importer->setUsernamePrefix( 'Xxx', $assign );
index b06df97..a6efc85 100644 (file)
@@ -275,7 +275,7 @@ class CSSMinTest extends MediaWikiTestCase {
                        . '%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228%22 height='
                        . '%228%22%3E%0A%09%3Ccircle cx=%224%22 cy=%224%22 r=%222%22/%3E%0A%3C/svg%3E%0A';
 
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                'Regular file',
@@ -492,7 +492,7 @@ class CSSMinTest extends MediaWikiTestCase {
                                '.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(http://localhost/w/images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }',
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index 97aeec3..8a11d87 100644 (file)
@@ -11,9 +11,8 @@ class XmlTypeCheckTest extends PHPUnit_Framework_TestCase {
 
        const WELL_FORMED_XML = "<root><child /></root>";
        const MAL_FORMED_XML = "<root><child /></error>";
-       // @codingStandardsIgnoreStart Generic.Files.LineLength
+       // phpcs:ignore Generic.Files.LineLength
        const XML_WITH_PIH = '<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/w/index.php"?><svg><child /></svg>';
-       // @codingStandardsIgnoreEnd
 
        /**
         * @covers XMLTypeCheck::newFromString
index 10dbcce..23f7865 100644 (file)
@@ -846,8 +846,8 @@ class DatabaseSQLTest extends PHPUnit_Framework_TestCase {
        }
 
        public static function provideUnionConditionPermutations() {
+               // phpcs:disable Generic.Files.LineLength
                return [
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
                        [
                                [
                                        'table' => [ 'table1', 'table2' ],
@@ -989,8 +989,8 @@ class DatabaseSQLTest extends PHPUnit_Framework_TestCase {
                                ],
                                "SELECT  foo_id  FROM foo    WHERE baz IS NULL  ORDER BY foo_id LIMIT 150,25"
                        ],
-                       // @codingStandardsIgnoreEnd
                ];
+               // phpcs:enable
        }
 
        /**
index 3dd7e4c..eb02e7e 100644 (file)
@@ -47,9 +47,8 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
         * @covers ExifBitmapHandler::isMetadataValid
         */
        public function testGoodMetadata() {
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:ignore Generic.Files.LineLength
                $meta = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
-               // @codingStandardsIgnoreEnd
                $res = $this->handler->isMetadataValid( null, $meta );
                $this->assertEquals( ExifBitmapHandler::METADATA_GOOD, $res );
        }
@@ -58,9 +57,8 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
         * @covers ExifBitmapHandler::isMetadataValid
         */
        public function testIsOldGood() {
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:ignore Generic.Files.LineLength
                $meta = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}';
-               // @codingStandardsIgnoreEnd
                $res = $this->handler->isMetadataValid( null, $meta );
                $this->assertEquals( ExifBitmapHandler::METADATA_COMPATIBLE, $res );
        }
@@ -70,9 +68,8 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
         * @covers ExifBitmapHandler::isMetadataValid
         */
        public function testPagedTiffHandledGracefully() {
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:ignore Generic.Files.LineLength
                $meta = 'a:6:{s:9:"page_data";a:1:{i:1;a:5:{s:5:"width";i:643;s:6:"height";i:448;s:5:"alpha";s:4:"true";s:4:"page";i:1;s:6:"pixels";i:288064;}}s:10:"page_count";i:1;s:10:"first_page";i:1;s:9:"last_page";i:1;s:4:"exif";a:9:{s:10:"ImageWidth";i:643;s:11:"ImageLength";i:448;s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:4;s:12:"RowsPerStrip";i:50;s:19:"PlanarConfiguration";i:1;s:22:"MEDIAWIKI_EXIF_VERSION";i:1;}s:21:"TIFF_METADATA_VERSION";s:3:"1.4";}';
-               // @codingStandardsIgnoreEnd
                $res = $this->handler->isMetadataValid( null, $meta );
                $this->assertEquals( ExifBitmapHandler::METADATA_BAD, $res );
        }
index 7cd9caf..4dd7443 100644 (file)
@@ -72,18 +72,18 @@ class GIFHandlerTest extends MediaWikiMediaTestCase {
        }
 
        public static function provideIsMetadataValid() {
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [ GIFHandler::BROKEN_FILE, GIFHandler::METADATA_GOOD ],
                        [ '', GIFHandler::METADATA_BAD ],
                        [ null, GIFHandler::METADATA_BAD ],
                        [ 'Something invalid!', GIFHandler::METADATA_BAD ],
-                       // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
                        [
                                'a:4:{s:10:"frameCount";i:1;s:6:"looped";b:0;s:8:"duration";d:0.1000000000000000055511151231257827021181583404541015625;s:8:"metadata";a:2:{s:14:"GIFFileComment";a:1:{i:0;s:35:"GIF test file ⁕ Created with GIMP";}s:15:"_MW_GIF_VERSION";i:1;}}',
                                GIFHandler::METADATA_GOOD
                        ],
-                       // @codingStandardsIgnoreEnd
                ];
+               // phpcs:enable
        }
 
        /**
@@ -99,8 +99,8 @@ class GIFHandlerTest extends MediaWikiMediaTestCase {
        }
 
        public static function provideGetMetadata() {
+               // phpcs:disable Generic.Files.LineLength
                return [
-                       // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
                        [
                                'nonanimated.gif',
                                'a:4:{s:10:"frameCount";i:1;s:6:"looped";b:0;s:8:"duration";d:0.1000000000000000055511151231257827021181583404541015625;s:8:"metadata";a:2:{s:14:"GIFFileComment";a:1:{i:0;s:35:"GIF test file ⁕ Created with GIMP";}s:15:"_MW_GIF_VERSION";i:1;}}'
@@ -109,8 +109,8 @@ class GIFHandlerTest extends MediaWikiMediaTestCase {
                                'animated-xmp.gif',
                                'a:4:{s:10:"frameCount";i:4;s:6:"looped";b:1;s:8:"duration";d:2.399999999999999911182158029987476766109466552734375;s:8:"metadata";a:5:{s:6:"Artist";s:7:"Bawolff";s:16:"ImageDescription";a:2:{s:9:"x-default";s:18:"A file to test GIF";s:5:"_type";s:4:"lang";}s:15:"SublocationDest";s:13:"The interwebs";s:14:"GIFFileComment";a:1:{i:0;s:16:"GIƒ·test·file";}s:15:"_MW_GIF_VERSION";i:1;}}'
                        ],
-                       // @codingStandardsIgnoreEnd
                ];
+               // phpcs:enable
        }
 
        /**
index abe0280..13de7ff 100644 (file)
@@ -24,9 +24,8 @@ class JpegTest extends MediaWikiMediaTestCase {
        public function testJpegMetadataExtraction() {
                $file = $this->dataFile( 'test.jpg', 'image/jpeg' );
                $res = $this->handler->getMetadata( $file, $this->filePath . 'test.jpg' );
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:ignore Generic.Files.LineLength
                $expected = 'a:7:{s:16:"ImageDescription";s:9:"Test file";s:11:"XResolution";s:4:"72/1";s:11:"YResolution";s:4:"72/1";s:14:"ResolutionUnit";i:2;s:16:"YCbCrPositioning";i:1;s:15:"JPEGFileComment";a:1:{i:0;s:17:"Created with GIMP";}s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
-               // @codingStandardsIgnoreEnd
 
                // Unserialize in case serialization format ever changes.
                $this->assertEquals( unserialize( $expected ), unserialize( $res ) );
index 4933f32..5a66586 100644 (file)
@@ -73,18 +73,18 @@ class PNGHandlerTest extends MediaWikiMediaTestCase {
        }
 
        public static function provideIsMetadataValid() {
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [ PNGHandler::BROKEN_FILE, PNGHandler::METADATA_GOOD ],
                        [ '', PNGHandler::METADATA_BAD ],
                        [ null, PNGHandler::METADATA_BAD ],
                        [ 'Something invalid!', PNGHandler::METADATA_BAD ],
-                       // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
                        [
                                'a:6:{s:10:"frameCount";i:0;s:9:"loopCount";i:1;s:8:"duration";d:0;s:8:"bitDepth";i:8;s:9:"colorType";s:10:"truecolour";s:8:"metadata";a:1:{s:15:"_MW_PNG_VERSION";i:1;}}',
                                PNGHandler::METADATA_GOOD
                        ],
-                       // @codingStandardsIgnoreEnd
                ];
+               // phpcs:enable
        }
 
        /**
@@ -101,8 +101,8 @@ class PNGHandlerTest extends MediaWikiMediaTestCase {
        }
 
        public static function provideGetMetadata() {
+               // phpcs:disable Generic.Files.LineLength
                return [
-                       // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
                        [
                                'rgb-na-png.png',
                                'a:6:{s:10:"frameCount";i:0;s:9:"loopCount";i:1;s:8:"duration";d:0;s:8:"bitDepth";i:8;s:9:"colorType";s:10:"truecolour";s:8:"metadata";a:1:{s:15:"_MW_PNG_VERSION";i:1;}}'
@@ -111,8 +111,8 @@ class PNGHandlerTest extends MediaWikiMediaTestCase {
                                'xmp.png',
                                'a:6:{s:10:"frameCount";i:0;s:9:"loopCount";i:1;s:8:"duration";d:0;s:8:"bitDepth";i:1;s:9:"colorType";s:14:"index-coloured";s:8:"metadata";a:2:{s:12:"SerialNumber";s:9:"123456789";s:15:"_MW_PNG_VERSION";i:1;}}'
                        ],
-                       // @codingStandardsIgnoreEnd
                ];
+               // phpcs:enable
        }
 
        /**
index 9bfd5f6..6fbb474 100644 (file)
@@ -128,14 +128,14 @@ class SVGMetadataExtractorTest extends MediaWikiTestCase {
 
        public static function provideSvgFilesWithXMLMetadata() {
                $base = __DIR__ . '/../../data/media';
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:disable Generic.Files.LineLength
                $metadata = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
       <ns4:Work xmlns:ns4="http://creativecommons.org/ns#" rdf:about="">
         <ns5:format xmlns:ns5="http://purl.org/dc/elements/1.1/">image/svg+xml</ns5:format>
         <ns5:type xmlns:ns5="http://purl.org/dc/elements/1.1/" rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
       </ns4:Work>
     </rdf:RDF>';
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
 
                $metadata = str_replace( "\r", '', $metadata ); // Windows compat
                return [
index d114820..8a69ec5 100644 (file)
@@ -34,9 +34,8 @@ class TiffTest extends MediaWikiTestCase {
        public function testTiffMetadataExtraction() {
                $res = $this->handler->getMetadata( null, $this->filePath . 'test.tiff' );
 
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:ignore Generic.Files.LineLength
                $expected = 'a:16:{s:10:"ImageWidth";i:20;s:11:"ImageLength";i:20;s:13:"BitsPerSample";a:3:{i:0;i:8;i:1;i:8;i:2;i:8;}s:11:"Compression";i:5;s:25:"PhotometricInterpretation";i:2;s:16:"ImageDescription";s:17:"Created with GIMP";s:12:"StripOffsets";i:8;s:11:"Orientation";i:1;s:15:"SamplesPerPixel";i:3;s:12:"RowsPerStrip";i:64;s:15:"StripByteCounts";i:238;s:11:"XResolution";s:19:"1207959552/16777216";s:11:"YResolution";s:19:"1207959552/16777216";s:19:"PlanarConfiguration";i:1;s:14:"ResolutionUnit";i:2;s:22:"MEDIAWIKI_EXIF_VERSION";i:2;}';
-               // @codingStandardsIgnoreEnd
 
                // Re-unserialize in case there are subtle differences between how versions
                // of php serialize stuff.
index ea06bbb..a0a99cc 100644 (file)
@@ -23,7 +23,7 @@ class WebPHandlerTest extends MediaWikiTestCase {
                $this->assertEquals( $expectedResult, WebPHandler::extractMetadata( $this->tempFileName ) );
        }
        public function provideTestExtractMetaData() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // Files from https://developers.google.com/speed/webp/gallery2
                        [ "\x52\x49\x46\x46\x90\x68\x01\x00\x57\x45\x42\x50\x56\x50\x38\x4C\x83\x68\x01\x00\x2F\x8F\x01\x4B\x10\x8D\x38\x6C\xDB\x46\x92\xE0\xE0\x82\x7B\x6C",
@@ -71,7 +71,7 @@ class WebPHandlerTest extends MediaWikiTestCase {
                        [ 'RIFF1234WEBPVP8                     ', false ],
                        [ 'RIFF1234WEBPVP8L                    ', false ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index 2b803ae..8e5b183 100644 (file)
@@ -1423,7 +1423,7 @@ more stuff
        }
 
        public function provideTestInsertProtectNullRevision() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                yield [
                        'goat-message-key',
                        [ 'edit' => 'sysop' ],
@@ -1442,7 +1442,7 @@ more stuff
                        true,
                        '(goat-key: WikiPageDbTestBase::testInsertProtectNullRevision, UTSysop)(colon-separator)Goat Goat(word-separator)(parentheses: (protect-summary-desc: (restriction-edit), (protect-level-sysop), (protect-expiring: 04:04, 1 (january) 2020, 1 (january) 2020, 04:04))(word-separator)(protect-summary-desc: (restriction-move), (protect-level-something), (protect-expiring: 05:05, 1 (january) 2021, 1 (january) 2021, 05:05)))'
                ];
-               // @codingStandardsIgnoreEnd Generic.Files.LineLength
+               // phpcs:enable
        }
 
        /**
index 441d60d..9642bbc 100644 (file)
@@ -123,7 +123,7 @@ class ParserOutputTest extends MediaWikiTestCase {
        }
 
        public static function provideGetText() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                $text = <<<EOF
 <p>Test document.
 </p>
@@ -315,7 +315,7 @@ EOF
 EOF
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
 }
index 11a2197..ab13899 100644 (file)
@@ -68,7 +68,7 @@ class PreprocessorTest extends MediaWikiTestCase {
        }
 
        public static function provideCases() {
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:disable Generic.Files.LineLength
                return self::addClassArg( [
                        [ "Foo", "<root>Foo</root>" ],
                        [ "<!-- Foo -->", "<root><comment>&lt;!-- Foo --&gt;</comment></root>" ],
@@ -156,7 +156,7 @@ class PreprocessorTest extends MediaWikiTestCase {
                        [ "{{Foo|} Bar=}}", "<root><template><title>Foo</title><part><name>} Bar</name>=<value></value></part></template></root>" ],
                        /* [ file_get_contents( __DIR__ . '/QuoteQuran.txt' ], file_get_contents( __DIR__ . '/QuoteQuranExpanded.txt' ) ], */
                ] );
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
@@ -208,7 +208,7 @@ class PreprocessorTest extends MediaWikiTestCase {
         * These are more complex test cases taken out of wiki articles.
         */
        public static function provideFiles() {
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:disable Generic.Files.LineLength
                return self::addClassArg( [
                        [ "QuoteQuran" ], # https://en.wikipedia.org/w/index.php?title=Template:QuoteQuran/sandbox&oldid=237348988 GFDL + CC BY-SA by Striver
                        [ "Factorial" ], # https://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 GFDL + CC BY-SA by Polonium
@@ -216,7 +216,7 @@ class PreprocessorTest extends MediaWikiTestCase {
                        [ "Fundraising" ], # https://tl.wiktionary.org/w/index.php?title=MediaWiki:Sitenotice&oldid=5716 GFDL + CC BY-SA, copied there by Sky Harbor.
                        [ "NestedTemplates" ], # T29936
                ] );
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
@@ -242,7 +242,7 @@ class PreprocessorTest extends MediaWikiTestCase {
         * Tests from T30642 · https://phabricator.wikimedia.org/T30642
         */
        public static function provideHeadings() {
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:disable Generic.Files.LineLength
                return self::addClassArg( [
                        /* These should become headings: */
                        [ "== h ==<!--c1-->", "<root><h level=\"2\" i=\"1\">== h ==<comment>&lt;!--c1--&gt;</comment></h></root>" ],
@@ -281,7 +281,7 @@ class PreprocessorTest extends MediaWikiTestCase {
                        [ "== h ==<!--c1--> x <!--c2--><!--c3-->  ", "<root>== h ==<comment>&lt;!--c1--&gt;</comment> x <comment>&lt;!--c2--&gt;</comment><comment>&lt;!--c3--&gt;</comment>  </root>" ],
                        [ "== h ==<!--c1--><!--c2--><!--c3--> x ", "<root>== h ==<comment>&lt;!--c1--&gt;</comment><comment>&lt;!--c2--&gt;</comment><comment>&lt;!--c3--&gt;</comment> x </root>" ],
                ] );
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index 9b8e01e..1673410 100644 (file)
@@ -16,7 +16,7 @@ class BcryptPasswordTest extends PasswordTestCase {
        }
 
        public static function providePasswordTests() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // Tests from glibc bcrypt implementation
                        [ true, ':bcrypt:5$CCCCCCCCCCCCCCCCCCCCC.$E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW', "U*U" ],
@@ -39,6 +39,6 @@ class BcryptPasswordTest extends PasswordTestCase {
                        [ false, ':bcrypt:5$CCCCCCCCCCCCCCCCCCCCC.$E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW', "UXU" ],
                        [ false, ':bcrypt:5$CCCCCCCCCCCCCCCCCCCCC.$E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW', "" ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 }
index 0c85653..7ed9711 100644 (file)
@@ -4,7 +4,6 @@
  * @covers EncryptedPassword
  * @covers ParameterizedPassword
  * @covers Password
- * @codingStandardsIgnoreStart Generic.Files.LineLength
  */
 class EncryptedPasswordTest extends PasswordTestCase {
        protected function getTypeConfigs() {
@@ -44,6 +43,7 @@ class EncryptedPasswordTest extends PasswordTestCase {
        }
 
        public static function providePasswordTests() {
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // Encrypted with secret1
                        [ true, ':both:aes-256-cbc:0:izBpxujqC1YbzpCB3qAzgg==:ZqHnitT1pL4YJqKqFES2KEevZYSy2LtlibW5+IMi4XKOGKGy6sE638BXyBbLQQsBtTSrt+JyzwOayKtwIfRbaQsBridx/O1JwBSai1TkGkOsYMBXnlu2Bu/EquCBj5QpjYh7p3Uq4rpiop1KQlin1BJMwnAa1PovhxjpxnYhlhkM4X5ALoGi3XM0bapN48vt', 'password' ],
@@ -54,6 +54,7 @@ class EncryptedPasswordTest extends PasswordTestCase {
                        [ true, ':both:aes-256-cbc:1:m1LCnQVIakfYBNlr9KEgQg==:5yPTctqrzsybdgaMEag18AZYbnL37pAtXVBqmWxkjXbnNmiDH+1bHoL8lsEVTH/sJntC82kNVgE7zeiD8xUVLYF2VUnvB5+sU+aysE45/zwsCu7a22TaischMAOWrsHZ/tIgS/TnZY2d+HNyxgsEeeYf/QoL+FhmqHquK02+4SRbA5lLuj9niYy1r5CoM9cQ', 'password' ],
                        [ true, ':secret2:aes-256-cbc:0:m1LCnQVIakfYBNlr9KEgQg==:5yPTctqrzsybdgaMEag18AZYbnL37pAtXVBqmWxkjXbnNmiDH+1bHoL8lsEVTH/sJntC82kNVgE7zeiD8xUVLYF2VUnvB5+sU+aysE45/zwsCu7a22TaischMAOWrsHZ/tIgS/TnZY2d+HNyxgsEeeYf/QoL+FhmqHquK02+4SRbA5lLuj9niYy1r5CoM9cQ', 'password' ],
                ];
+               // phpcs:enable
        }
 
        /**
@@ -61,12 +62,14 @@ class EncryptedPasswordTest extends PasswordTestCase {
         * @expectedException PasswordError
         */
        public function testDecryptionError() {
+               // phpcs:ignore Generic.Files.LineLength
                $hash = ':secret1:aes-256-cbc:0:m1LCnQVIakfYBNlr9KEgQg==:5yPTctqrzsybdgaMEag18AZYbnL37pAtXVBqmWxkjXbnNmiDH+1bHoL8lsEVTH/sJntC82kNVgE7zeiD8xUVLYF2VUnvB5+sU+aysE45/zwsCu7a22TaischMAOWrsHZ/tIgS/TnZY2d+HNyxgsEeeYf/QoL+FhmqHquK02+4SRbA5lLuj9niYy1r5CoM9cQ';
                $password = $this->passwordFactory->newFromCiphertext( $hash );
                $password->crypt( 'password' );
        }
 
        public function testUpdate() {
+               // phpcs:ignore Generic.Files.LineLength
                $hash = ':both:aes-256-cbc:0:izBpxujqC1YbzpCB3qAzgg==:ZqHnitT1pL4YJqKqFES2KEevZYSy2LtlibW5+IMi4XKOGKGy6sE638BXyBbLQQsBtTSrt+JyzwOayKtwIfRbaQsBridx/O1JwBSai1TkGkOsYMBXnlu2Bu/EquCBj5QpjYh7p3Uq4rpiop1KQlin1BJMwnAa1PovhxjpxnYhlhkM4X5ALoGi3XM0bapN48vt';
                $fromHash = $this->passwordFactory->newFromCiphertext( $hash );
                $fromPlaintext = $this->passwordFactory->newFromPlaintext( 'password', $fromHash );
index cf96d06..cee4fbb 100644 (file)
@@ -35,15 +35,15 @@ class LayeredParameterizedPasswordTest extends PasswordTestCase {
        }
 
        public static function providePasswordTests() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                true,
                                ':testLargeLayeredTop:sha512:1024:512!sha512:1024:512!sha512:1024:512!sha512:1024:512!5!vnRy+2SrSA0fHt3dwhTP5g==!AVnwfZsAQjn+gULv7FSGjA==!xvHUX3WcpkeSn1lvjWcvBg==!It+OC/N9tu+d3ByHhuB0BQ==!Tb.gqUOiD.aWktVwHM.Q/O!7CcyMfXUPky5ptyATJsR2nq3vUqtnBC',
-                               'testPassword123' 
+                               'testPassword123'
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index 49aeb30..c83f500 100644 (file)
@@ -207,7 +207,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                        'test.exempt' => 'ready',
                ] );
 
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                $expected = '<script>document.documentElement.className = document.documentElement.className.replace( /(^|\s)client-nojs(\s|$)/, "$1client-js$2" );</script>' . "\n"
                        . '<script>(window.RLQ=window.RLQ||[]).push(function(){'
                        . 'mw.config.set({"key":"value"});'
@@ -219,7 +219,7 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                        . '<link rel="stylesheet" href="/w/load.php?debug=false&amp;lang=nl&amp;modules=test.styles.pure&amp;only=styles&amp;skin=fallback"/>' . "\n"
                        . '<style>.private{}</style>' . "\n"
                        . '<script async="" src="/w/load.php?debug=false&amp;lang=nl&amp;modules=startup&amp;only=scripts&amp;skin=fallback"></script>';
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
                $expected = self::expandVariables( $expected );
 
                $this->assertEquals( $expected, $client->getHeadHtml() );
@@ -250,8 +250,8 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
        }
 
        public static function provideMakeLoad() {
+               // phpcs:disable Generic.Files.LineLength
                return [
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength
                        [
                                'context' => [],
                                'modules' => [ 'test.unknown' ],
@@ -349,8 +349,8 @@ class ResourceLoaderClientHtmlTest extends PHPUnit_Framework_TestCase {
                                        . '<style>.orderingC{}.orderingD{}</style>' . "\n"
                                        . '<link rel="stylesheet" href="/w/load.php?debug=false&amp;lang=nl&amp;modules=test.ordering.e&amp;only=styles&amp;skin=fallback"/>'
                        ],
-                       // @codingStandardsIgnoreEnd
                ];
+               // phpcs:enable
        }
 
        /**
index 6b0095c..0718af6 100644 (file)
@@ -7,8 +7,8 @@ class ResourceLoaderSkinModuleTest extends PHPUnit_Framework_TestCase {
 
        use MediaWikiCoversValidator;
 
-       // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
        public static function provideGetStyles() {
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [
                                'parent' => [],
@@ -66,8 +66,8 @@ CSS
                                ],
                        ],
                ];
+               // phpcs:enable
        }
-       // @codingStandardsIgnoreEnd
 
        /**
         * @dataProvider provideGetStyles
index 02e6e79..1585375 100644 (file)
@@ -29,9 +29,8 @@ class FirejailCommandTest extends PHPUnit_Framework_TestCase {
 
        public function provideBuildFinalCommand() {
                global $IP;
-               // @codingStandardsIgnoreStart
+               // phpcs:ignore Generic.Files.LineLength
                $env = "'MW_INCLUDE_STDERR=;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=307200; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'";
-               // @codingStandardsIgnoreEnd
                $limit = "/bin/bash '$IP/includes/shell/limit.sh'";
                $profile = "--profile=$IP/includes/shell/firejail.profile";
                $blacklist = '--blacklist=' . realpath( MW_CONFIG_FILE );
index 32dd7f2..ae85f8a 100644 (file)
@@ -90,13 +90,13 @@ class DBSiteStoreTest extends MediaWikiTestCase {
                $site = $store->getSite( 'ertrywuutr' );
                $this->assertInstanceOf( 'Site', $site );
                $this->assertEquals( 'en', $site->getLanguageCode() );
-               $this->assertTrue( is_integer( $site->getInternalId() ) );
+               $this->assertTrue( is_int( $site->getInternalId() ) );
                $this->assertTrue( $site->getInternalId() >= 0 );
 
                $site = $store->getSite( 'sdfhxujgkfpth' );
                $this->assertInstanceOf( 'Site', $site );
                $this->assertEquals( 'nl', $site->getLanguageCode() );
-               $this->assertTrue( is_integer( $site->getInternalId() ) );
+               $this->assertTrue( is_int( $site->getInternalId() ) );
                $this->assertTrue( $site->getInternalId() >= 0 );
        }
 
index f7d0117..a4a171c 100644 (file)
@@ -99,7 +99,7 @@ class SiteListTest extends MediaWikiTestCase {
                 * @var Site $site
                 */
                foreach ( $sites as $site ) {
-                       if ( is_integer( $site->getInternalId() ) ) {
+                       if ( is_int( $site->getInternalId() ) ) {
                                $this->assertEquals( $site, $sites->getSiteByInternalId( $site->getInternalId() ) );
                        }
                }
@@ -155,7 +155,7 @@ class SiteListTest extends MediaWikiTestCase {
                 * @var Site $site
                 */
                foreach ( $sites as $site ) {
-                       if ( is_integer( $site->getInternalId() ) ) {
+                       if ( is_int( $site->getInternalId() ) ) {
                                $this->assertTrue( $site, $sites->hasInternalId( $site->getInternalId() ) );
                        }
                }
index f980af0..b20557f 100644 (file)
@@ -200,14 +200,14 @@ class RemexDriverTest extends MediaWikiTestCase {
                        'a<small><i><div>d</div></i>e</small>',
                        '<p>a</p><small><i><div>d</div></i></small><p><small>e</small></p>'
                ],
+               // phpcs:disable Generic.Files.LineLength
                [
                        'Complex pwrap test 6',
                        '<i>a<div>b</div>c<b>d<div>e</div>f</b>g</i>',
-                       // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
                        // PHP 5 does not allow concatenation in initialisation of a class static variable
                        '<p><i>a</i></p><i><div>b</div></i><p><i>c<b>d</b></i></p><i><b><div>e</div></b></i><p><i><b>f</b>g</i></p>'
-                       // @codingStandardsIgnoreEnd
                ],
+               // phpcs:enable
                /* FIXME the second <b> causes a stack split which clones the <i> even
                 * though no <p> is actually generated
                [
index bc7493d..3541091 100644 (file)
@@ -138,7 +138,7 @@ class UploadBaseTest extends MediaWikiTestCase {
        }
 
        public static function provideCheckSvgScriptCallback() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // html5sec SVG vectors
                        [
@@ -511,7 +511,7 @@ class UploadBaseTest extends MediaWikiTestCase {
                                'DTD with aliased entities apos (Should be allowed)'
                        ]
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index ac638c6..c9c1345 100644 (file)
@@ -44,7 +44,7 @@ class MWCryptHKDFTest extends MediaWikiTestCase {
         * Test vectors from Appendix A on https://tools.ietf.org/html/rfc5869
         */
        public static function providerRfc5869() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:disable Generic.Files.LineLength
                return [
                        // A.1
                        [
@@ -97,6 +97,6 @@ class MWCryptHKDFTest extends MediaWikiTestCase {
                                '0bd770a74d1160f7c9f12cd5912a06ebff6adcae899d92191fe4305673ba2ffe8fa3f1a4e5ad79f3f334b3b202b2173c486ea37ce3d397ed034c7f9dfeb15c5e927336d0441f4c4300e2cff0d0900b52d3b4' // okm
                        ],
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 }
index 13151ab..f6503ef 100644 (file)
@@ -23,9 +23,8 @@ class MWCryptHashTest extends PHPUnit_Framework_TestCase {
                }
 
                $data = 'foobar';
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:ignore Generic.Files.LineLength
                $hash = '9923afaec3a86f865bb231a588f453f84e8151a2deb4109aebc6de4284be5bebcff4fab82a7e51d920237340a043736e9d13bab196006dcca0fe65314d68eab9';
-               // @codingStandardsIgnoreEnd
 
                $this->assertEquals(
                        hex2bin( $hash ),
@@ -46,9 +45,8 @@ class MWCryptHashTest extends PHPUnit_Framework_TestCase {
 
                $data = 'foobar';
                $key = 'secret';
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               // phpcs:ignore Generic.Files.LineLength
                $hash = 'ddc94177b2020e55ce2049199fd9cc6327f416ff6dc621cc34cb43d9bec61d73372b4790c0e24957f565ecaf2d42821e6303619093e99cbe14a3b9250bda5f81';
-               // @codingStandardsIgnoreEnd
 
                $this->assertEquals(
                        hex2bin( $hash ),
index 0c34130..5cb5602 100644 (file)
@@ -1326,7 +1326,7 @@ class LanguageTest extends LanguageClassesTestCase {
        }
 
        public static function provideCheckTitleEncodingData() {
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:disable Generic.Files.LineLength
                return [
                        [ "" ],
                        [ "United States of America" ], // 7bit ASCII
@@ -1377,7 +1377,7 @@ class LanguageTest extends LanguageClassesTestCase {
                                )
                        ]
                ];
-               // @codingStandardsIgnoreEnd
+               // phpcs:enable
        }
 
        /**
index de68435..4f049cd 100644 (file)
@@ -1,11 +1,11 @@
 <?php
 
-// @codingStandardsIgnoreStart Ignore Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
 /**
  * @covers LanguageBe_tarask
  */
 class LanguageBe_taraskTest extends LanguageClassesTestCase {
-       // @codingStandardsIgnoreEnd
+       // phpcs:enable
        /**
         * Make sure the language code we are given is indeed
         * be-tarask. This is to ensure LanguageClassesTestCase
index d7a0074..1487729 100644 (file)
@@ -76,7 +76,7 @@ class LanguagePlTest extends LanguageClassesTestCase {
        }
 
        /**
-        * @covers LanguagePl::commafy()
+        * @covers Language::commafy()
         * @dataProvider provideCommafyData
         */
        public function testCommafy( $number, $numbersWithCommas ) {
index 9124040..3e120f4 100644 (file)
@@ -6,9 +6,6 @@
  * @file
  */
 
-/**
- * @covers LanguageRu
- */
 class LanguageRuTest extends LanguageClassesTestCase {
        /**
         * @dataProvider providePlural
index 3791622..0ccebbe 100644 (file)
@@ -6,9 +6,6 @@
  * @file
  */
 
-/**
- * @covers LanguageUk
- */
 class LanguageUkTest extends LanguageClassesTestCase {
        /**
         * @dataProvider providePlural
index 2c5931d..010bb17 100644 (file)
@@ -151,7 +151,7 @@ class BaseDumpTest extends MediaWikiTestCase {
                $fname = $this->getNewTempFile();
 
                // The header of every prefetch file
-               // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
+               // phpcs:ignore Generic.Files.LineLength
                $header = '<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.7/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.7/ http://www.mediawiki.org/xml/export-0.7.xsd" version="0.7" xml:lang="en">
   <siteinfo>
     <sitename>wikisvn</sitename>
@@ -180,7 +180,6 @@ class BaseDumpTest extends MediaWikiTestCase {
     </namespaces>
   </siteinfo>
 ';
-               // @codingStandardsIgnoreEnd
 
                // An array holding the pages that are available for prefetch
                $available_pages = [];