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

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I5b84aec326dad863af152e0b53dbd9f8f66e40d2
---
M ApiFlowThank.php
M ApiRevThank.php
M ApiThank.php
M Thanks.hooks.php
M phpcs.xml
5 files changed, 29 insertions(+), 32 deletions(-)

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



diff --git a/ApiFlowThank.php b/ApiFlowThank.php
index 81867eb..0cc1d9a 100644
--- a/ApiFlowThank.php
+++ b/ApiFlowThank.php
@@ -188,6 +188,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/ApiRevThank.php b/ApiRevThank.php
index 102da35..23475eb 100644
--- a/ApiRevThank.php
+++ b/ApiRevThank.php
@@ -128,6 +128,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/ApiThank.php b/ApiThank.php
index fac762e..a294f5e 100644
--- a/ApiThank.php
+++ b/ApiThank.php
@@ -86,8 +86,8 @@
return 'csrf';
}
 
-   // Writes to the Echo database and sometimes log tables.
public function isWriteMode() {
+   // Writes to the Echo database and sometimes log tables.
return true;
}
 }
diff --git a/Thanks.hooks.php b/Thanks.hooks.php
index cf8fe9b..a55c7fb 100644
--- a/Thanks.hooks.php
+++ b/Thanks.hooks.php
@@ -12,8 +12,8 @@
 * ResourceLoaderTestModules hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
 *
-* @param array $testModules
-* @param ResourceLoader $resourceLoader
+* @param array &$testModules
+* @param ResourceLoader &$resourceLoader
 * @return bool
 */
public static function onResourceLoaderTestModules( array &$testModules,
@@ -36,9 +36,10 @@
/**
 * Handler for HistoryRevisionTools and DiffRevisionTools hooks.
 * Inserts 'thank' link into revision interface
-* @param $rev Revision object to add the thank link for
-* @param &$links array Links to add to the revision interface
-* @param $oldRev Revision object of the "old" revision when viewing a 
diff
+* @param Revision $rev Revision object to add the thank link for
+* @param array &$links Links to add to the revision interface
+* @param Revision $oldRev Revision object of the "old" revision when 
viewing a diff
+* @param User $user
 * @return bool
 */
public static function insertThankLink( $rev, &$links, $oldRev = null, 
User $user ) {
@@ -85,8 +86,8 @@
/**
 * Helper for self::insertThankLink
 * Creates either a thank link or thanked span based on users session
-* @param $rev Revision object to generate the thank element for
-* @param $recipient User who receives thanks notification
+* @param Revision $rev Revision object to generate the thank element 
for
+* @param User $recipient User who receives thanks notification
 * @return string
 */
protected static function generateThankElement( $rev, $recipient ) {
@@ -120,9 +121,9 @@
/**
 * Handler for PageHistoryBeforeList hook.
 * @see http://www.mediawiki.org/wiki/Manual:Hooks/PageHistoryBeforeList
-* @param &$page WikiPage|Article|ImagePage|CategoryPage|Page The page 
for which the history
+* @param WikiPage|Article|ImagePage|CategoryPage|Page &$page The page 
for which the history
 *   is loading.
-* @param $context RequestContext object
+* @param RequestContext $context RequestContext object
 * @return bool true in all cases
 */
public static function onPageHistoryBeforeList( &$page, $context ) {
@@ -141,9 +142,9 @@
/**
 * Handler for DiffViewHeader hook.
 * @see http://www.mediawiki.org/wiki/Manual:Hooks/DiffViewHeader
-* @param $diff DifferenceEngine
-* @param $oldRev Revision object of the "old" revision (may be 
null/invalid)
-* @param $newRev Revision object of the "new" revision
+* @param DifferenceEngine $diff
+* @param Revision $oldRev Revision object of the "old" revision (may 
be null/invalid)
+* @param Revision $newRev Revision object of the "new" revision
 * @return bool true in all cases
 */
public static function onDiffViewHeader( $diff, $oldRev, $newRev ) {
@@ -162,9 +163,9 @@
/**
 * Add Thanks events to Echo
 *
-* @param $notifications array of Echo notifications
-* @param $notificationCategories array of Echo notification cat

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

2017-09-24 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380329 )

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I5b84aec326dad863af152e0b53dbd9f8f66e40d2
---
M ApiFlowThank.php
M ApiRevThank.php
M ApiThank.php
M Thanks.hooks.php
M phpcs.xml
5 files changed, 29 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Thanks 
refs/changes/29/380329/1

diff --git a/ApiFlowThank.php b/ApiFlowThank.php
index 81867eb..0cc1d9a 100644
--- a/ApiFlowThank.php
+++ b/ApiFlowThank.php
@@ -188,6 +188,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/ApiRevThank.php b/ApiRevThank.php
index 102da35..23475eb 100644
--- a/ApiRevThank.php
+++ b/ApiRevThank.php
@@ -128,6 +128,7 @@
 
/**
 * @see ApiBase::getExamplesMessages()
+* @return array
 */
protected function getExamplesMessages() {
return [
diff --git a/ApiThank.php b/ApiThank.php
index fac762e..a294f5e 100644
--- a/ApiThank.php
+++ b/ApiThank.php
@@ -86,8 +86,8 @@
return 'csrf';
}
 
-   // Writes to the Echo database and sometimes log tables.
public function isWriteMode() {
+   // Writes to the Echo database and sometimes log tables.
return true;
}
 }
diff --git a/Thanks.hooks.php b/Thanks.hooks.php
index cf8fe9b..a55c7fb 100644
--- a/Thanks.hooks.php
+++ b/Thanks.hooks.php
@@ -12,8 +12,8 @@
 * ResourceLoaderTestModules hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
 *
-* @param array $testModules
-* @param ResourceLoader $resourceLoader
+* @param array &$testModules
+* @param ResourceLoader &$resourceLoader
 * @return bool
 */
public static function onResourceLoaderTestModules( array &$testModules,
@@ -36,9 +36,10 @@
/**
 * Handler for HistoryRevisionTools and DiffRevisionTools hooks.
 * Inserts 'thank' link into revision interface
-* @param $rev Revision object to add the thank link for
-* @param &$links array Links to add to the revision interface
-* @param $oldRev Revision object of the "old" revision when viewing a 
diff
+* @param Revision $rev Revision object to add the thank link for
+* @param array &$links Links to add to the revision interface
+* @param Revision $oldRev Revision object of the "old" revision when 
viewing a diff
+* @param User $user
 * @return bool
 */
public static function insertThankLink( $rev, &$links, $oldRev = null, 
User $user ) {
@@ -85,8 +86,8 @@
/**
 * Helper for self::insertThankLink
 * Creates either a thank link or thanked span based on users session
-* @param $rev Revision object to generate the thank element for
-* @param $recipient User who receives thanks notification
+* @param Revision $rev Revision object to generate the thank element 
for
+* @param User $recipient User who receives thanks notification
 * @return string
 */
protected static function generateThankElement( $rev, $recipient ) {
@@ -120,9 +121,9 @@
/**
 * Handler for PageHistoryBeforeList hook.
 * @see http://www.mediawiki.org/wiki/Manual:Hooks/PageHistoryBeforeList
-* @param &$page WikiPage|Article|ImagePage|CategoryPage|Page The page 
for which the history
+* @param WikiPage|Article|ImagePage|CategoryPage|Page &$page The page 
for which the history
 *   is loading.
-* @param $context RequestContext object
+* @param RequestContext $context RequestContext object
 * @return bool true in all cases
 */
public static function onPageHistoryBeforeList( &$page, $context ) {
@@ -141,9 +142,9 @@
/**
 * Handler for DiffViewHeader hook.
 * @see http://www.mediawiki.org/wiki/Manual:Hooks/DiffViewHeader
-* @param $diff DifferenceEngine
-* @param $oldRev Revision object of the "old" revision (may be 
null/invalid)
-* @param $newRev Revision object of the "new" revision
+* @param DifferenceEngine $diff
+* @param Revision $oldRev Revision object of the "old" revision (may 
be null/invalid)
+* @param Revision $newRev Revision object of the "new" revision
 * @return bool true in all cases
 */
public static function onDiffViewHeader( $diff, $oldRev, $newRev ) {
@@ -162,9 +163,9 @@
/**
 * Add Thanks events to Echo
 *
-* @param $notifications array of Echo notifications
-* @param $notificationCategories array of Echo n