[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Improve some parameter docs

2017-10-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/382761 )

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: Ibac10a20243a4eedd826485d56eddd5234da6fec
---
M includes/AFComputedVariable.php
M includes/AbuseFilter.class.php
M includes/AbuseFilter.hooks.php
M includes/AbuseFilterVariableHolder.php
M includes/Views/AbuseFilterView.php
M includes/Views/AbuseFilterViewEdit.php
M includes/Views/AbuseFilterViewExamine.php
M includes/Views/AbuseFilterViewHistory.php
M includes/Views/AbuseFilterViewRevert.php
M includes/api/ApiAbuseFilterCheckMatch.php
M includes/api/ApiAbuseFilterCheckSyntax.php
M includes/api/ApiAbuseFilterEvalExpression.php
M includes/api/ApiAbuseFilterUnblockAutopromote.php
M includes/api/ApiQueryAbuseFilters.php
M includes/api/ApiQueryAbuseLog.php
M includes/parser/AFPData.php
M includes/parser/AbuseFilterCachingParser.php
M includes/parser/AbuseFilterParser.php
M includes/special/SpecialAbuseLog.php
M phpcs.xml
20 files changed, 180 insertions(+), 179 deletions(-)

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



diff --git a/includes/AFComputedVariable.php b/includes/AFComputedVariable.php
index 45d635b..c8f3351 100644
--- a/includes/AFComputedVariable.php
+++ b/includes/AFComputedVariable.php
@@ -6,8 +6,8 @@
public static $articleCache = [];
 
/**
-* @param $method
-* @param $parameters
+* @param string $method
+* @param array $parameters
 */
function __construct( $method, $parameters ) {
$this->mMethod = $method;
@@ -47,7 +47,7 @@
 * in case a user name is given as argument. Nowadays user objects are 
passed
 * directly but many old log entries rely on this.
 *
-* @param $user string|User
+* @param string|User $user
 * @return User
 */
static function getUserObject( $user ) {
@@ -86,8 +86,8 @@
}
 
/**
-* @param $namespace
-* @param $title Title
+* @param int $namespace
+* @param Title $title
 * @return Article
 */
static function articleFromTitle( $namespace, $title ) {
@@ -134,7 +134,7 @@
}
 
/**
-* @param $vars AbuseFilterVariableHolder
+* @param AbuseFilterVariableHolder $vars
 * @return AFPData|array|int|mixed|null|string
 * @throws MWException
 * @throws AFPException
diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php
index 776cdc4..552a351 100644
--- a/includes/AbuseFilter.class.php
+++ b/includes/AbuseFilter.class.php
@@ -380,7 +380,7 @@
}
 
/**
-* @param $filter
+* @param string $filter
 * @return mixed
 */
public static function checkSyntax( $filter ) {
@@ -393,7 +393,7 @@
}
 
/**
-* @param $expr
+* @param string $expr
 * @param array $vars
 * @return string
 */
@@ -1293,7 +1293,7 @@
 * Retrieve a var dump from External Storage or the text table
 * Some of this code is stolen from Revision::loadText et al
 *
-* @param $stored_dump
+* @param string $stored_dump
 *
 * @return object|AbuseFilterVariableHolder|bool
 */
@@ -1592,8 +1592,8 @@
}
 
/**
-* @param $throttleId
-* @param $types
+* @param string $throttleId
+* @param array $types
 * @param Title $title
 * @param string $rateCount
 * @param string $ratePeriod
@@ -1670,7 +1670,7 @@
}
 
/**
-* @param $throttleId
+* @param string $throttleId
 * @param string $type
 * @param Title $title
 * @param bool $global
@@ -2530,10 +2530,10 @@
return $text;
}
 
-   /*
+   /**
 * Get the history ID of the first change to a given filter
 *
-* @param int $filterId Filter id
+* @param int $filterID Filter id
 * @return int
 */
public static function getFirstFilterChange( $filterID ) {
diff --git a/includes/AbuseFilter.hooks.php b/includes/AbuseFilter.hooks.php
index 6e14e26..8c5de14 100644
--- a/includes/AbuseFilter.hooks.php
+++ b/includes/AbuseFilter.hooks.php
@@ -211,16 +211,16 @@
}
 
/**
-* @param Article|WikiPage $article
-* @param User $user
+* @param Article|WikiPage &$article
+* @param User &$user
 * @param string $content Content
 * @param string $summary
 * @param bool $minoredit
 * @param bool $watchthis
 * @param string $sectionanchor
-* @param int $flags
+* @param int &$flags
 * @param Revision $revision
-* @param Status $status
+* @param Status &$status
 

[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Improve some parameter docs

2017-10-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/382761 )

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: Ibac10a20243a4eedd826485d56eddd5234da6fec
---
M includes/AFComputedVariable.php
M includes/AbuseFilter.class.php
M includes/AbuseFilter.hooks.php
M includes/AbuseFilterVariableHolder.php
M includes/Views/AbuseFilterView.php
M includes/Views/AbuseFilterViewEdit.php
M includes/Views/AbuseFilterViewExamine.php
M includes/Views/AbuseFilterViewHistory.php
M includes/Views/AbuseFilterViewRevert.php
M includes/api/ApiAbuseFilterCheckMatch.php
M includes/api/ApiAbuseFilterCheckSyntax.php
M includes/api/ApiAbuseFilterEvalExpression.php
M includes/api/ApiAbuseFilterUnblockAutopromote.php
M includes/api/ApiQueryAbuseFilters.php
M includes/api/ApiQueryAbuseLog.php
M includes/parser/AFPData.php
M includes/parser/AbuseFilterCachingParser.php
M includes/parser/AbuseFilterParser.php
M includes/special/SpecialAbuseLog.php
M phpcs.xml
20 files changed, 179 insertions(+), 178 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/61/382761/1

diff --git a/includes/AFComputedVariable.php b/includes/AFComputedVariable.php
index 45d635b..c8f3351 100644
--- a/includes/AFComputedVariable.php
+++ b/includes/AFComputedVariable.php
@@ -6,8 +6,8 @@
public static $articleCache = [];
 
/**
-* @param $method
-* @param $parameters
+* @param string $method
+* @param array $parameters
 */
function __construct( $method, $parameters ) {
$this->mMethod = $method;
@@ -47,7 +47,7 @@
 * in case a user name is given as argument. Nowadays user objects are 
passed
 * directly but many old log entries rely on this.
 *
-* @param $user string|User
+* @param string|User $user
 * @return User
 */
static function getUserObject( $user ) {
@@ -86,8 +86,8 @@
}
 
/**
-* @param $namespace
-* @param $title Title
+* @param int $namespace
+* @param Title $title
 * @return Article
 */
static function articleFromTitle( $namespace, $title ) {
@@ -134,7 +134,7 @@
}
 
/**
-* @param $vars AbuseFilterVariableHolder
+* @param AbuseFilterVariableHolder $vars
 * @return AFPData|array|int|mixed|null|string
 * @throws MWException
 * @throws AFPException
diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php
index 3ce5cdb..2fcc8a6 100644
--- a/includes/AbuseFilter.class.php
+++ b/includes/AbuseFilter.class.php
@@ -379,7 +379,7 @@
}
 
/**
-* @param $filter
+* @param string $filter
 * @return mixed
 */
public static function checkSyntax( $filter ) {
@@ -392,7 +392,7 @@
}
 
/**
-* @param $expr
+* @param string $expr
 * @param array $vars
 * @return string
 */
@@ -1292,7 +1292,7 @@
 * Retrieve a var dump from External Storage or the text table
 * Some of this code is stolen from Revision::loadText et al
 *
-* @param $stored_dump
+* @param string $stored_dump
 *
 * @return object|AbuseFilterVariableHolder|bool
 */
@@ -1591,8 +1591,8 @@
}
 
/**
-* @param $throttleId
-* @param $types
+* @param string $throttleId
+* @param array $types
 * @param Title $title
 * @param string $rateCount
 * @param string $ratePeriod
@@ -1669,7 +1669,7 @@
}
 
/**
-* @param $throttleId
+* @param string $throttleId
 * @param string $type
 * @param Title $title
 * @param bool $global
@@ -2529,10 +2529,10 @@
return $text;
}
 
-   /*
+   /**
 * Get the history ID of the first change to a given filter
 *
-* @param int $filterId Filter id
+* @param int $filterID Filter id
 * @return int
 */
public static function getFirstFilterChange( $filterID ) {
diff --git a/includes/AbuseFilter.hooks.php b/includes/AbuseFilter.hooks.php
index 6e14e26..8c5de14 100644
--- a/includes/AbuseFilter.hooks.php
+++ b/includes/AbuseFilter.hooks.php
@@ -211,16 +211,16 @@
}
 
/**
-* @param Article|WikiPage $article
-* @param User $user
+* @param Article|WikiPage &$article
+* @param User &$user
 * @param string $content Content
 * @param string $summary
 * @param bool $minoredit
 * @param bool $watchthis
 * @param string $sectionanchor
-* @param int $flags
+* @param int &$flags
 * @param Revision $revision
-* @param Status $status
+* @para

[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Improve some parameter docs

2017-08-08 Thread MaxSem (Code Review)
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_USERto 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 +

[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Improve some parameter docs

2017-08-04 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370297 )

Change subject: Improve some parameter docs
..

Improve some parameter docs

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/97/370297/1

diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index 55be162..e0b29cf 100644
--- a/AbuseFilter.hooks.php
+++ b/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/Views/AbuseFilterViewDiff.php b/Views/AbuseFilterViewDiff.php
index 0f4f694..2525c53 100644
--- a/Views/AbuseFilterViewDiff.php
+++ b/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
 */