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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
......................................................................


build: Updating mediawiki/mediawiki-codesniffer to 0.10.0

The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I1f26ccbd6c2cff74982166bfa43b9a693a8850d3
---
M composer.json
M includes/Hooks/ApiHooksHandler.php
M includes/Scoring.php
M maintenance/CheckModelVersions.php
M maintenance/CleanDuplicateScores.php
M maintenance/DumpThresholds.php
M maintenance/PopulateDatabase.php
M maintenance/PurgeScoreCache.php
M phpcs.xml
M tests/phpunit/includes/CacheTest.php
10 files changed, 28 insertions(+), 19 deletions(-)

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



diff --git a/composer.json b/composer.json
index 91d0813..15fdc96 100644
--- a/composer.json
+++ b/composer.json
@@ -1,14 +1,14 @@
 {
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
-               "mediawiki/mediawiki-codesniffer": "0.7.2",
+               "mediawiki/mediawiki-codesniffer": "0.10.0",
                "jakub-onderka/php-console-highlighter": "0.3.2"
        },
        "scripts": {
                "fix": "phpcbf",
                "test": [
                        "parallel-lint . --exclude vendor",
-                       "phpcs -p"
+                       "phpcs -s -p"
                ]
        }
 }
diff --git a/includes/Hooks/ApiHooksHandler.php 
b/includes/Hooks/ApiHooksHandler.php
index 53c5685..4a328fa 100644
--- a/includes/Hooks/ApiHooksHandler.php
+++ b/includes/Hooks/ApiHooksHandler.php
@@ -308,7 +308,7 @@
                                $logger->info( "Scoring errored for $revision: 
$mssg\n" );
                        } );
                        $cacheableScores = $cache->filterScores( $loadedScores, 
$cacheableRevids );
-                       DeferredUpdates::addCallableUpdate( function() use ( 
$cache, $cacheableScores ) {
+                       DeferredUpdates::addCallableUpdate( function () use ( 
$cache, $cacheableScores ) {
                                $cache->storeScores( $cacheableScores );
                        } );
 
diff --git a/includes/Scoring.php b/includes/Scoring.php
index 32e4f5c..b3da76a 100644
--- a/includes/Scoring.php
+++ b/includes/Scoring.php
@@ -24,8 +24,8 @@
                }
 
                $params = [
-                       'models' => implode( '|', (array) $models ),
-                       'revids' => implode( '|', (array) $revisions ),
+                       'models' => implode( '|', (array)$models ),
+                       'revids' => implode( '|', (array)$revisions ),
                ];
 
                if ( $this->originalRequest === null ) {
diff --git a/maintenance/CheckModelVersions.php 
b/maintenance/CheckModelVersions.php
index 9f12e3d..d9c02ca 100644
--- a/maintenance/CheckModelVersions.php
+++ b/maintenance/CheckModelVersions.php
@@ -4,9 +4,9 @@
 
 use Maintenance;
 
-require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
+require_once getenv( 'MW_INSTALL_PATH' ) !== false
        ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
-       : __DIR__ . '/../../../maintenance/Maintenance.php' );
+       : __DIR__ . '/../../../maintenance/Maintenance.php';
 
 /**
  * @ingroup Maintenance
diff --git a/maintenance/CleanDuplicateScores.php 
b/maintenance/CleanDuplicateScores.php
index 1add144..994e290 100644
--- a/maintenance/CleanDuplicateScores.php
+++ b/maintenance/CleanDuplicateScores.php
@@ -5,9 +5,9 @@
 use Maintenance;
 use MediaWiki\MediaWikiServices;
 
-require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
+require_once getenv( 'MW_INSTALL_PATH' ) !== false
        ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
-       : __DIR__ . '/../../../maintenance/Maintenance.php' );
+       : __DIR__ . '/../../../maintenance/Maintenance.php';
 
 /**
  * @ingroup Maintenance
diff --git a/maintenance/DumpThresholds.php b/maintenance/DumpThresholds.php
index e3a01da..5e1695f 100644
--- a/maintenance/DumpThresholds.php
+++ b/maintenance/DumpThresholds.php
@@ -4,9 +4,9 @@
 
 use Maintenance;
 
-require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
+require_once getenv( 'MW_INSTALL_PATH' ) !== false
        ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
-       : __DIR__ . '/../../../maintenance/Maintenance.php' );
+       : __DIR__ . '/../../../maintenance/Maintenance.php';
 
 /**
  * @ingroup Maintenance
diff --git a/maintenance/PopulateDatabase.php b/maintenance/PopulateDatabase.php
index eeb2bad..a3fc13a 100644
--- a/maintenance/PopulateDatabase.php
+++ b/maintenance/PopulateDatabase.php
@@ -5,9 +5,9 @@
 use Maintenance;
 use MediaWiki\MediaWikiServices;
 
-require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
+require_once getenv( 'MW_INSTALL_PATH' ) !== false
        ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
-       : __DIR__ . '/../../../maintenance/Maintenance.php' );
+       : __DIR__ . '/../../../maintenance/Maintenance.php';
 
 /**
  * @ingroup Maintenance
diff --git a/maintenance/PurgeScoreCache.php b/maintenance/PurgeScoreCache.php
index eeaa703..a95da39 100644
--- a/maintenance/PurgeScoreCache.php
+++ b/maintenance/PurgeScoreCache.php
@@ -4,9 +4,9 @@
 
 use Maintenance;
 
-require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
+require_once getenv( 'MW_INSTALL_PATH' ) !== false
        ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
-       : __DIR__ . '/../../../maintenance/Maintenance.php' );
+       : __DIR__ . '/../../../maintenance/Maintenance.php';
 
 /**
  * @ingroup Maintenance
diff --git a/phpcs.xml b/phpcs.xml
index 7c4adbe..4b5dd82 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,15 @@
 <?xml version="1.0"?>
 <ruleset>
-       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
+       <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
+               <exclude 
name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
+               <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+       </rule>
 
        <rule ref="Generic.ControlStructures" />
        <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag" />
@@ -26,6 +35,6 @@
 
        <file>.</file>
        <arg name="extensions" value="php" />
-       <arg name="encoding" value="utf8" />
+       <arg name="encoding" value="UTF-8" />
        <exclude-pattern>vendor</exclude-pattern>
 </ruleset>
diff --git a/tests/phpunit/includes/CacheTest.php 
b/tests/phpunit/includes/CacheTest.php
index 3fc3e9f..007120a 100644
--- a/tests/phpunit/includes/CacheTest.php
+++ b/tests/phpunit/includes/CacheTest.php
@@ -131,7 +131,7 @@
                                                'oresc_is_predicted' => false
                                        ],
                                ],
-                           12345
+                               12345
                        ]
                ];
        }
@@ -226,7 +226,7 @@
                                'oresc_model',
                                'oresc_class',
                                'oresc_probability',
-                           'oresc_is_predicted'
+                               'oresc_is_predicted'
                        ],
                        [ 'oresc_rev' => $revIds ],
                        __METHOD__,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f26ccbd6c2cff74982166bfa43b9a693a8850d3
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to