Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370963 )

Change subject: Improve some parameter docs
......................................................................

Improve some parameter docs

Change-Id: Id0862750b6e892e047807bcc3145ffab635f6116
---
M composer.json
M includes/Cache.php
M includes/Hooks.php
M includes/Hooks/PreferencesHookHandler.php
M includes/Scoring.php
M maintenance/CheckModelVersions.php
M maintenance/DumpThresholds.php
M phpcs.xml
8 files changed, 22 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/63/370963/1

diff --git a/composer.json b/composer.json
index 3a00ee9..9800bda 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,7 @@
        "scripts": {
                "fix": "phpcbf",
                "test": [
-                       "parallel-lint . --exclude vendor",
+                       "parallel-lint . --exclude vendor --exclude 
node_modules",
                        "phpcs -s -p"
                ]
        }
diff --git a/includes/Cache.php b/includes/Cache.php
index 5306a6c..9b06564 100644
--- a/includes/Cache.php
+++ b/includes/Cache.php
@@ -61,7 +61,7 @@
         * @param bool $isEverything When true, delete scores with the 
up-to-date
         *   model version as well.  This can be used in cases where the old 
data is
         *   bad, but no new model has been released yet.
-        * @param integer $batchSize Maximum number of records to delete per 
loop.
+        * @param int $batchSize Maximum number of records to delete per loop.
         *   Note that this function runs multiple batches, until all records 
are deleted.
         * @return int The number of deleted rows
         */
@@ -83,7 +83,7 @@
         * Delete old cached scores.
         * A score is old of the corresponding revision is not in the 
recentchanges table.
         * @param string $model Model name.
-        * @param integer $batchSize Maximum number of records to delete per 
loop.
+        * @param int $batchSize Maximum number of records to delete per loop.
         *   Note that this function runs multiple batches, until all records 
are deleted.
         * @return int The number of deleted rows
         */
@@ -106,7 +106,7 @@
         * @param array $tables
         * @param array $conditions
         * @param array $join_conds
-        * @param integer $batchSize Maximum number of records to delete per 
loop.
+        * @param int $batchSize Maximum number of records to delete per loop.
         *   Note that this function runs multiple batches, until all records 
are deleted.
         * @return int The number of deleted rows
         * @see Database::select
diff --git a/includes/Hooks.php b/includes/Hooks.php
index bd4c4ed..eb8b3c0 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -411,10 +411,10 @@
         * Label recent changes with ORES scores (for each change in an 
expanded group)
         *
         * @param EnhancedChangesList $ecl
-        * @param array $data
+        * @param array &$data
         * @param RCCacheEntry[] $block
         * @param RCCacheEntry $rcObj
-        * @param string[] $classes
+        * @param string[] &$classes
         */
        public static function onEnhancedChangesListModifyLineData(
                EnhancedChangesList $ecl,
@@ -434,7 +434,7 @@
         * Label recent changes with ORES scores (for top-level ungrouped lines)
         *
         * @param EnhancedChangesList $ecl
-        * @param array $data
+        * @param array &$data
         * @param RCCacheEntry $rcObj
         */
        public static function onEnhancedChangesListModifyBlockLineData(
@@ -455,10 +455,11 @@
         * Hook for formatting recent changes links
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/OldChangesListRecentChangesLine
         *
-        * @param ChangesList $changesList
-        * @param string $s
+        * @param ChangesList &$changesList
+        * @param string &$s
         * @param RecentChange $rc
         * @param string[] &$classes
+        * @return bool|void
         */
        public static function onOldChangesListRecentChangesLine(
                ChangesList &$changesList,
@@ -499,7 +500,7 @@
         * Filter out non-damaging changes from Special:Contributions
         *
         * @param ContribsPager $pager
-        * @param array $query
+        * @param array &$query
         */
        public static function onContribsGetQueryInfo(
                ContribsPager $pager,
@@ -685,8 +686,8 @@
        /**
         * Add CSS styles to output page
         *
-        * @param OutputPage $out
-        * @param Skin $skin
+        * @param OutputPage &$out
+        * @param Skin &$skin
         */
        public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
                if ( !self::oresUiEnabled( $out->getUser() ) ) {
@@ -774,7 +775,7 @@
 
        /**
         * @param IContextSource $context
-        * @return boolean Whether $context->getTitle() is a RecentChanges page
+        * @return bool Whether $context->getTitle() is a RecentChanges page
         */
        private static function isRCPage( IContextSource $context ) {
                return $context->getTitle()->isSpecial( 'Recentchanges' ) ||
@@ -783,7 +784,7 @@
 
        /**
         * @param IContextSource $title
-        * @return boolean Whether highlights should be shown
+        * @return bool Whether highlights should be shown
         */
        private static function isHighlightEnabled( IContextSource $context ) {
                // Was previously controlled by different preferences than the 
"r", but they're currently
@@ -793,7 +794,7 @@
 
        /**
         * @param IContextSource $context
-        * @return boolean Whether the damaging flag ("r") should be shown
+        * @return bool Whether the damaging flag ("r") should be shown
         */
        private static function isDamagingFlagEnabled( IContextSource $context 
) {
                global $wgOresExtensionStatus;
diff --git a/includes/Hooks/PreferencesHookHandler.php 
b/includes/Hooks/PreferencesHookHandler.php
index c0cb3bd..a0452ae 100644
--- a/includes/Hooks/PreferencesHookHandler.php
+++ b/includes/Hooks/PreferencesHookHandler.php
@@ -12,7 +12,7 @@
         * Also let people make hidenondamaging default
         *
         * @param User $user
-        * @param string[] $preferences
+        * @param string[] &$preferences
         */
        public static function onGetPreferences( User $user, array 
&$preferences ) {
                global $wgOresFiltersThresholds, $wgOresExtensionStatus, 
$wgHiddenPrefs;
diff --git a/includes/Scoring.php b/includes/Scoring.php
index b3da76a..618626c 100644
--- a/includes/Scoring.php
+++ b/includes/Scoring.php
@@ -9,7 +9,7 @@
        private $originalRequest;
 
        /**
-        * @param integer|array $revisions Single or multiple revisions
+        * @param int|array $revisions Single or multiple revisions
         * @param string|array|null $models Single or multiple model names.  If
         * left empty, all configured models are queries.
         * @param array $extra_params to be passed to ORES endpoint
diff --git a/maintenance/CheckModelVersions.php 
b/maintenance/CheckModelVersions.php
index d9c02ca..3539a58 100644
--- a/maintenance/CheckModelVersions.php
+++ b/maintenance/CheckModelVersions.php
@@ -57,6 +57,8 @@
 
        /**
         * Return a list of models available for this wiki.
+        * @return array
+        * @throws \RuntimeException
         */
        protected function getModels() {
                $timestamp = \wfTimestampNow();
diff --git a/maintenance/DumpThresholds.php b/maintenance/DumpThresholds.php
index 5e1695f..c96aa3a 100644
--- a/maintenance/DumpThresholds.php
+++ b/maintenance/DumpThresholds.php
@@ -34,6 +34,8 @@
 
        /**
         * Return a list of models available for this wiki.
+        * @return array
+        * @throws \RuntimeException
         */
        protected function getModels() {
                $timestamp = \wfTimestampNow();
diff --git a/phpcs.xml b/phpcs.xml
index bf33d5d..0fdd7dd 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,9 +2,6 @@
 <ruleset>
        <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" />
@@ -13,7 +10,6 @@
 
        <rule ref="Generic.ControlStructures" />
 
-       <rule ref="Squiz.Classes.SelfMemberReference" />
        <rule ref="Squiz.ControlStructures.ControlSignature" />
        <rule ref="Squiz.Functions.FunctionDuplicateArgument" />
        <rule ref="Squiz.Functions.GlobalFunction" />
@@ -32,5 +28,4 @@
        <file>.</file>
        <arg name="extensions" value="php" />
        <arg name="encoding" value="UTF-8" />
-       <exclude-pattern>vendor</exclude-pattern>
 </ruleset>

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

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

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

Reply via email to