MaxSem has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370297 )

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


Improve some parameter docs

Change-Id: I03fa9b58c72bcd28985c5a3467b82d8b98f3a0fc
---
M includes/AbuseFilter.class.php
M includes/AbuseFilter.hooks.php
M includes/Views/AbuseFilterViewDiff.php
M includes/parser/AbuseFilterTokenizer.php
4 files changed, 54 insertions(+), 54 deletions(-)

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



diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php
index f0af762..8a91828 100644
--- a/includes/AbuseFilter.class.php
+++ b/includes/AbuseFilter.class.php
@@ -1698,7 +1698,7 @@
        }
 
        /**
-        * @param $user User
+        * @param User $user
         * @return String
         */
        public static function autoPromoteBlockKey( $user ) {
@@ -1878,10 +1878,10 @@
        }
 
        /**
-        * @param $rules String
-        * @param $textName String
-        * @param $addResultDiv Boolean
-        * @param $canEdit Boolean
+        * @param string $rules
+        * @param string $textName
+        * @param bool $addResultDiv
+        * @param bool $canEdit
         * @return string
         */
        static function buildEditBox( $rules, $textName = 'wpFilterRules', 
$addResultDiv = true,
@@ -1965,8 +1965,8 @@
         * Each version is expected to be an array( $row, $actions )
         * Returns an array of fields that are different.
         *
-        * @param $version_1
-        * @param $version_2
+        * @param array $version_1
+        * @param array $version_2
         *
         * @return array
         */
@@ -2013,7 +2013,7 @@
        }
 
        /**
-        * @param $row
+        * @param stdClass $row
         * @return array
         */
        static function translateFromHistory( $row ) {
@@ -2053,7 +2053,7 @@
        }
 
        /**
-        * @param $action string
+        * @param string $action
         * @return String
         */
        static function getActionDisplay( $action ) {
@@ -2068,7 +2068,7 @@
        }
 
        /**
-        * @param $row
+        * @param stdClass $row
         * @return AbuseFilterVariableHolder|null
         */
        public static function getVarsFromRCRow( $row ) {
@@ -2091,7 +2091,7 @@
        }
 
        /**
-        * @param $row
+        * @param stdClass $row
         * @return AbuseFilterVariableHolder
         */
        public static function getCreateVarsFromRCRow( $row ) {
@@ -2114,7 +2114,7 @@
        }
 
        /**
-        * @param $row
+        * @param stdClass $row
         * @return AbuseFilterVariableHolder
         */
        public static function getEditVarsFromRCRow( $row ) {
@@ -2152,7 +2152,7 @@
        }
 
        /**
-        * @param $row
+        * @param stdClass $row
         * @return AbuseFilterVariableHolder
         */
        public static function getMoveVarsFromRCRow( $row ) {
@@ -2329,10 +2329,10 @@
        /**
         * @param $page
         * @param $type
-        * @param $title Title
-        * @param $sk Skin
-        * @param $args array
-        * @param $filterWikilinks bool
+        * @param Title $title
+        * @param Skin $sk
+        * @param array $args
+        * @param bool $filterWikilinks
         * @return String
         */
        static function modifyActionText( $page, $type, $title, $sk, $args, 
$filterWikilinks ) {
@@ -2445,7 +2445,7 @@
         * the function returns with an empty string.
         *
         * @param Revision $revision a valid revision
-        * @param $audience Integer: one of:
+        * @param int $audience one of:
         *      Revision::FOR_PUBLIC       to be displayed to all users
         *      Revision::FOR_THIS_USER    to be displayed to the given user
         *      Revision::RAW              get the text regardless of 
permissions
@@ -2502,8 +2502,8 @@
        /*
         * Get the history ID of the first change to a given filter
         *
-        * @param $filterId integer: Filter id
-        * @return integer|bool
+        * @param int $filterId Filter id
+        * @return int|bool
         */
        public static function getFirstFilterChange( $filterID ) {
                static $firstChanges = [];
diff --git a/includes/AbuseFilter.hooks.php b/includes/AbuseFilter.hooks.php
index b102341..fdba9a5 100644
--- a/includes/AbuseFilter.hooks.php
+++ b/includes/AbuseFilter.hooks.php
@@ -224,10 +224,10 @@
         * @param bool $minoredit
         * @param bool $watchthis
         * @param string $sectionanchor
-        * @param integer $flags
+        * @param int $flags
         * @param Revision $revision
-        * @param $status Status
-        * @param $baseRevId
+        * @param Status $status
+        * @param int $baseRevId
         * @return bool
         */
        public static function onPageContentSaveComplete(
@@ -288,8 +288,8 @@
 
        /**
         * Check if two article objects are identical or have an identical 
WikiPage
-        * @param $page1 Article|WikiPage
-        * @param $page2 Article|WikiPage
+        * @param Article|WikiPage $page1
+        * @param Article|WikiPage $page2
         * @return bool
         */
        protected static function identicalPageObjects( $page1, $page2 ) {
@@ -304,8 +304,8 @@
        }
 
        /**
-        * @param $user
-        * @param $promote
+        * @param User $user
+        * @param array $promote
         * @return bool
         */
        public static function onGetAutoPromoteGroups( $user, &$promote ) {
@@ -346,11 +346,11 @@
        }
 
        /**
-        * @param $oldTitle Title
-        * @param $newTitle Title
-        * @param $user User
-        * @param $error
-        * @param $reason
+        * @param Title $oldTitle
+        * @param Title $newTitle
+        * @param User $user
+        * @param string $error
+        * @param string $reason
         * @return bool
         */
        public static function onAbortMove( $oldTitle, $newTitle, $user, 
&$error, $reason ) {
@@ -400,9 +400,9 @@
        }
 
        /**
-        * @param $user User
-        * @param $message
-        * @param $autocreate bool Indicates whether the account is created 
automatically.
+        * @param User $user
+        * @param string $message
+        * @param bool $autocreate Indicates whether the account is created 
automatically.
         * @return bool
         * @deprecated AbuseFilterPreAuthenticationProvider will take over this 
functionality
         */
@@ -434,8 +434,8 @@
        }
 
        /**
-        * @param $user User
-        * @param $message
+        * @param User $user
+        * @param string $message
         * @return bool
         * @deprecated AbuseFilterPreAuthenticationProvider will take over this 
functionality
         */
@@ -444,8 +444,8 @@
        }
 
        /**
-        * @param $user User
-        * @param $message
+        * @param User $user
+        * @param string $message
         * @return bool
         * @deprecated AbuseFilterPreAuthenticationProvider will take over this 
functionality
         */
@@ -457,7 +457,7 @@
        }
 
        /**
-        * @param $recentChange RecentChange
+        * @param RecentChange $recentChange
         * @return bool
         */
        public static function onRecentChangeSave( $recentChange ) {
@@ -584,7 +584,7 @@
        }
 
        /**
-        * @param $updater DatabaseUpdater
+        * @param DatabaseUpdater $updater
         * @throws MWException
         * @return bool
         */
@@ -728,8 +728,8 @@
 
        /**
         * @param $id
-        * @param $nt Title
-        * @param $tools
+        * @param Title $nt
+        * @param array $tools
         * @param SpecialPage|null $sp for context in newer MW versions
         * @return bool
         */
diff --git a/includes/Views/AbuseFilterViewDiff.php 
b/includes/Views/AbuseFilterViewDiff.php
index 0f4f694..2525c53 100644
--- a/includes/Views/AbuseFilterViewDiff.php
+++ b/includes/Views/AbuseFilterViewDiff.php
@@ -124,8 +124,8 @@
        /**
         * Get the history ID of the next change
         *
-        * @param $historyId Integer: History id to find next change of
-        * @return Integer|Null: Id of the next change or null if there isn't 
one
+        * @param int $historyId History id to find next change of
+        * @return int|null Id of the next change or null if there isn't one
         */
        function getNextHistoryId( $historyId ) {
                $dbr = wfGetDB( DB_SLAVE );
@@ -242,8 +242,8 @@
        }
 
        /**
-        * @param $timestamp
-        * @param $history_id
+        * @param string $timestamp
+        * @param int $history_id
         * @return string
         */
        function formatVersionLink( $timestamp, $history_id ) {
@@ -362,7 +362,7 @@
        }
 
        /**
-        * @param $actions
+        * @param array $actions
         * @return array
         */
        function stringifyActions( $actions ) {
@@ -381,8 +381,8 @@
        }
 
        /**
-        * @param $msg
-        * @return String
+        * @param string $msg
+        * @return string
         */
        function getHeaderRow( $msg ) {
                $html = $this->msg( $msg )->parse();
@@ -393,9 +393,9 @@
        }
 
        /**
-        * @param $msg
-        * @param $old
-        * @param $new
+        * @param string $msg
+        * @param array|string $old
+        * @param array|string $new
         * @return string
         */
        function getDiffRow( $msg, $old, $new ) {
diff --git a/includes/parser/AbuseFilterTokenizer.php 
b/includes/parser/AbuseFilterTokenizer.php
index f58b327..025314e 100644
--- a/includes/parser/AbuseFilterTokenizer.php
+++ b/includes/parser/AbuseFilterTokenizer.php
@@ -102,7 +102,7 @@
 
        /**
         * @param string $code
-        * @param integer &$offset
+        * @param int &$offset
         * @return AFPToken
         * @throws AFPException
         * @throws AFPUserVisibleException

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03fa9b58c72bcd28985c5a3467b82d8b98f3a0fc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Huji <huji.h...@gmail.com>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Thcipriani <tcipri...@wikimedia.org>
Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to