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

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I8e656d2fdf324e768cd173e73f92a63bbc41ef39
---
M TitleBlacklist.hooks.php
M TitleBlacklist.list.php
M api/ApiQueryTitleBlacklist.php
M phpcs.xml
4 files changed, 56 insertions(+), 37 deletions(-)

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



diff --git a/TitleBlacklist.hooks.php b/TitleBlacklist.hooks.php
index 3648d5b..6e1b75c 100644
--- a/TitleBlacklist.hooks.php
+++ b/TitleBlacklist.hooks.php
@@ -37,10 +37,10 @@
/**
 * getUserPermissionsErrorsExpensive hook
 *
-* @param $title Title
-* @param $user User
-* @param $action
-* @param $result
+* @param Title $title
+* @param User $user
+* @param string $action
+* @param array &$result
 * @return bool
 */
public static function userCan( $title, $user, $action, &$result ) {
@@ -90,8 +90,9 @@
 * because they have tboverride.
 *
 * @param Title $title
-* @param integer $oldid
+* @param int $oldid
 * @param array &$notices
+* @return true
 */
public static function displayBlacklistOverrideNotice( Title $title, 
$oldid, array &$notices ) {
if ( !RequestContext::getMain()->getUser()->isAllowed( 
'tboverride' ) ) {
@@ -123,7 +124,7 @@
 * @param Title $oldTitle
 * @param Title $newTitle
 * @param User $user
-* @param $reason
+* @param string $reason
 * @param Status $status
 * @return bool
 */
@@ -155,6 +156,11 @@
 * Used by abortNewAccount and centralAuthAutoCreate.
 * May also be called externally to vet alternate account names.
 *
+* @param string $userName
+* @param User $permissionsUser
+* @param string &$err
+* @param bool $override
+* @param bool $log
 * @return bool Acceptable
 */
public static function acceptNewUserName(
@@ -215,7 +221,7 @@
 *
 * @param User $user
 * @param string &$message
-* @param Status $status
+* @param Status &$status
 * @return bool
 */
public static function abortNewAccount( $user, &$message, &$status ) {
@@ -247,7 +253,11 @@
/**
 * EditFilter hook
 *
-* @param $editor EditPage
+* @param EditPage $editor
+* @param string $text
+* @param string $section
+* @param string &$error
+* @return true
 */
public static function validateBlacklist( $editor, $text, $section, 
&$error ) {
$title = $editor->mTitle;
@@ -279,7 +289,14 @@
/**
 * PageContentSaveComplete hook
 *
-* @param Article $article
+* @param Article &$article
+* @param User &$user
+* @param Content $content
+* @param string $summary
+* @param bool $isminor
+* @param bool $iswatch
+* @param string $section
+* @return true
 */
public static function clearBlacklist( &$article, &$user,
$content, $summary, $isminor, $iswatch, $section
@@ -291,7 +308,11 @@
return true;
}
 
-   /** UserCreateForm hook based on the one from AntiSpoof extension */
+   /**
+* UserCreateForm hook based on the one from AntiSpoof extension
+* @param UsercreateTemplate &$template
+* @return true
+*/
public static function addOverrideCheckbox( &$template ) {
global $wgRequest, $wgUser;
 
@@ -304,8 +325,8 @@
}
 
/**
-* @param ApiBase $module
-* @param array $params
+* @param ApiBase &$module
+* @param array &$params
 * @return bool
 */
public static function onAPIGetAllowedParams( ApiBase &$module, array 
&$params ) {
@@ -367,7 +388,7 @@
 * External Lua library for Scribunto
 *
 * @param string $engine
-* @param array $extraLibraries
+* @param array &$extraLibraries
 * @return bool
 */
public static function scribuntoExternalLibraries( $engine, array 
&$extraLibraries ) {
diff --git a/TitleBlacklist.list.php b/TitleBlacklist.list.php
index b7b29ae..57f526d 100644
--- a/TitleBlacklist.list.php
+++ b/TitleBlacklist.list.php
@@ -153,7 +153,8 @@
/**
 * Parse blacklist from a string
 *
-* @param $list string Text of a blacklist source
+* @param string $list Text of a blacklist source
+* @param string $sourceName
 * @return array of TitleBlacklistEntry entries
 */
public static function parseBlacklist( 

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

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I8e656d2fdf324e768cd173e73f92a63bbc41ef39
---
M TitleBlacklist.hooks.php
M TitleBlacklist.list.php
M api/ApiQueryTitleBlacklist.php
M phpcs.xml
4 files changed, 56 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TitleBlacklist 
refs/changes/05/371005/1

diff --git a/TitleBlacklist.hooks.php b/TitleBlacklist.hooks.php
index 3648d5b..6e1b75c 100644
--- a/TitleBlacklist.hooks.php
+++ b/TitleBlacklist.hooks.php
@@ -37,10 +37,10 @@
/**
 * getUserPermissionsErrorsExpensive hook
 *
-* @param $title Title
-* @param $user User
-* @param $action
-* @param $result
+* @param Title $title
+* @param User $user
+* @param string $action
+* @param array &$result
 * @return bool
 */
public static function userCan( $title, $user, $action, &$result ) {
@@ -90,8 +90,9 @@
 * because they have tboverride.
 *
 * @param Title $title
-* @param integer $oldid
+* @param int $oldid
 * @param array &$notices
+* @return true
 */
public static function displayBlacklistOverrideNotice( Title $title, 
$oldid, array &$notices ) {
if ( !RequestContext::getMain()->getUser()->isAllowed( 
'tboverride' ) ) {
@@ -123,7 +124,7 @@
 * @param Title $oldTitle
 * @param Title $newTitle
 * @param User $user
-* @param $reason
+* @param string $reason
 * @param Status $status
 * @return bool
 */
@@ -155,6 +156,11 @@
 * Used by abortNewAccount and centralAuthAutoCreate.
 * May also be called externally to vet alternate account names.
 *
+* @param string $userName
+* @param User $permissionsUser
+* @param string &$err
+* @param bool $override
+* @param bool $log
 * @return bool Acceptable
 */
public static function acceptNewUserName(
@@ -215,7 +221,7 @@
 *
 * @param User $user
 * @param string &$message
-* @param Status $status
+* @param Status &$status
 * @return bool
 */
public static function abortNewAccount( $user, &$message, &$status ) {
@@ -247,7 +253,11 @@
/**
 * EditFilter hook
 *
-* @param $editor EditPage
+* @param EditPage $editor
+* @param string $text
+* @param string $section
+* @param string &$error
+* @return true
 */
public static function validateBlacklist( $editor, $text, $section, 
&$error ) {
$title = $editor->mTitle;
@@ -279,7 +289,14 @@
/**
 * PageContentSaveComplete hook
 *
-* @param Article $article
+* @param Article &$article
+* @param User &$user
+* @param Content $content
+* @param string $summary
+* @param bool $isminor
+* @param bool $iswatch
+* @param string $section
+* @return true
 */
public static function clearBlacklist( &$article, &$user,
$content, $summary, $isminor, $iswatch, $section
@@ -291,7 +308,11 @@
return true;
}
 
-   /** UserCreateForm hook based on the one from AntiSpoof extension */
+   /**
+* UserCreateForm hook based on the one from AntiSpoof extension
+* @param UsercreateTemplate &$template
+* @return true
+*/
public static function addOverrideCheckbox( &$template ) {
global $wgRequest, $wgUser;
 
@@ -304,8 +325,8 @@
}
 
/**
-* @param ApiBase $module
-* @param array $params
+* @param ApiBase &$module
+* @param array &$params
 * @return bool
 */
public static function onAPIGetAllowedParams( ApiBase &$module, array 
&$params ) {
@@ -367,7 +388,7 @@
 * External Lua library for Scribunto
 *
 * @param string $engine
-* @param array $extraLibraries
+* @param array &$extraLibraries
 * @return bool
 */
public static function scribuntoExternalLibraries( $engine, array 
&$extraLibraries ) {
diff --git a/TitleBlacklist.list.php b/TitleBlacklist.list.php
index b7b29ae..57f526d 100644
--- a/TitleBlacklist.list.php
+++ b/TitleBlacklist.list.php
@@ -153,7 +153,8 @@
/**
 * Parse blacklist from a string
 *
-* @param $list string Text of a blacklist source
+* @param string $list Text of a blacklist source
+* @param string $sourceName
 * @return array of TitleBlacklistEntry entries
 */
public static