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

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

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I268aaa13d07985b0915774e83c487cd22568b161
---
M GadgetHooks.php
M Gadgets_body.php
M SpecialGadgetUsage.php
M SpecialGadgets.php
M api/ApiQueryGadgetCategories.php
M api/ApiQueryGadgets.php
M includes/GadgetDefinitionNamespaceRepo.php
M includes/GadgetResourceLoaderModule.php
M includes/MediaWikiGadgetsDefinitionRepo.php
M includes/content/GadgetDefinitionContent.php
M phpcs.xml
11 files changed, 36 insertions(+), 39 deletions(-)

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



diff --git a/GadgetHooks.php b/GadgetHooks.php
index d19ff3f..5dd756a 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -26,9 +26,9 @@
/**
 * PageContentSaveComplete hook handler.
 *
-* @param $article Article
-* @param $user User
-* @param $content Content New page content
+* @param Article $article
+* @param User $user
+* @param Content $content New page content
 * @return bool
 */
public static function onPageContentSaveComplete( $article, $user, 
$content ) {
@@ -45,7 +45,7 @@
 
/**
 * UserGetDefaultOptions hook handler
-* @param $defaultOptions Array of default preference keys and values
+* @param array &$defaultOptions Array of default preference keys and 
values
 * @return bool
 */
public static function userGetDefaultOptions( &$defaultOptions ) {
@@ -70,8 +70,8 @@
 
/**
 * GetPreferences hook handler.
-* @param $user User
-* @param $preferences Array: Preference descriptions
+* @param User $user
+* @param array &$preferences Preference descriptions
 * @return bool
 */
public static function getPreferences( $user, &$preferences ) {
@@ -138,7 +138,7 @@
 
/**
 * ResourceLoaderRegisterModules hook handler.
-* @param $resourceLoader ResourceLoader
+* @param ResourceLoader &$resourceLoader
 * @return bool
 */
public static function registerModules( &$resourceLoader ) {
@@ -157,7 +157,7 @@
 
/**
 * BeforePageDisplay hook handler.
-* @param $out OutputPage
+* @param OutputPage $out
 * @return bool
 */
public static function beforePageDisplay( $out ) {
@@ -287,7 +287,7 @@
 * in the Gadget namespace based on their file extension
 *
 * @param Title $title
-* @param string $model
+* @param string &$model
 * @return bool
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
@@ -312,7 +312,7 @@
 * knows the language for Gadget: namespace pages.
 *
 * @param Title $title
-* @param string $lang
+* @param string &$lang
 * @return bool
 */
public static function onCodeEditorGetPageLanguage( Title $title, 
&$lang ) {
diff --git a/Gadgets_body.php b/Gadgets_body.php
index dc37a5f..b197ed2 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -116,28 +116,28 @@
}
 
/**
-* @return String: Gadget name
+* @return string Gadget name
 */
public function getName() {
return $this->name;
}
 
/**
-* @return String: Gadget description parsed into HTML
+* @return string Gadget description parsed into HTML
 */
public function getDescription() {
return wfMessage( "gadget-{$this->getName()}" )->parse();
}
 
/**
-* @return String: Wikitext of gadget description
+* @return string Wikitext of gadget description
 */
public function getRawDescription() {
return wfMessage( "gadget-{$this->getName()}" )->plain();
}
 
/**
-* @return String: Name of category (aka section) our gadget belongs 
to. Empty string if none.
+* @return string Name of category (aka section) our gadget belongs to. 
Empty string if none.
 */
public function getCategory() {
return $this->category;
@@ -154,8 +154,8 @@
/**
 * Checks whether this gadget is enabled for given user
 *
-* @param $user User: user to check against
-* @return Boolean
+* @param User $user user to check against
+* @return bool
 */
public function isEnabled( $user ) {
return (bool)$user->getOption( "gadget-{$this->name}", 
$this->onByDefault );
@@ -164,8 +164,8 @@
/**
 * Checks whether given user has permissions to use this gadget
 *
-* @param $user User: user to check against
- 

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

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I268aaa13d07985b0915774e83c487cd22568b161
---
M GadgetHooks.php
M Gadgets_body.php
M SpecialGadgetUsage.php
M SpecialGadgets.php
M api/ApiQueryGadgetCategories.php
M api/ApiQueryGadgets.php
M includes/GadgetDefinitionNamespaceRepo.php
M includes/GadgetResourceLoaderModule.php
M includes/MediaWikiGadgetsDefinitionRepo.php
M includes/content/GadgetDefinitionContent.php
M phpcs.xml
11 files changed, 36 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/72/374072/1

diff --git a/GadgetHooks.php b/GadgetHooks.php
index d19ff3f..5dd756a 100644
--- a/GadgetHooks.php
+++ b/GadgetHooks.php
@@ -26,9 +26,9 @@
/**
 * PageContentSaveComplete hook handler.
 *
-* @param $article Article
-* @param $user User
-* @param $content Content New page content
+* @param Article $article
+* @param User $user
+* @param Content $content New page content
 * @return bool
 */
public static function onPageContentSaveComplete( $article, $user, 
$content ) {
@@ -45,7 +45,7 @@
 
/**
 * UserGetDefaultOptions hook handler
-* @param $defaultOptions Array of default preference keys and values
+* @param array &$defaultOptions Array of default preference keys and 
values
 * @return bool
 */
public static function userGetDefaultOptions( &$defaultOptions ) {
@@ -70,8 +70,8 @@
 
/**
 * GetPreferences hook handler.
-* @param $user User
-* @param $preferences Array: Preference descriptions
+* @param User $user
+* @param array &$preferences Preference descriptions
 * @return bool
 */
public static function getPreferences( $user, &$preferences ) {
@@ -138,7 +138,7 @@
 
/**
 * ResourceLoaderRegisterModules hook handler.
-* @param $resourceLoader ResourceLoader
+* @param ResourceLoader &$resourceLoader
 * @return bool
 */
public static function registerModules( &$resourceLoader ) {
@@ -157,7 +157,7 @@
 
/**
 * BeforePageDisplay hook handler.
-* @param $out OutputPage
+* @param OutputPage $out
 * @return bool
 */
public static function beforePageDisplay( $out ) {
@@ -287,7 +287,7 @@
 * in the Gadget namespace based on their file extension
 *
 * @param Title $title
-* @param string $model
+* @param string &$model
 * @return bool
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
@@ -312,7 +312,7 @@
 * knows the language for Gadget: namespace pages.
 *
 * @param Title $title
-* @param string $lang
+* @param string &$lang
 * @return bool
 */
public static function onCodeEditorGetPageLanguage( Title $title, 
&$lang ) {
diff --git a/Gadgets_body.php b/Gadgets_body.php
index dc37a5f..b197ed2 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -116,28 +116,28 @@
}
 
/**
-* @return String: Gadget name
+* @return string Gadget name
 */
public function getName() {
return $this->name;
}
 
/**
-* @return String: Gadget description parsed into HTML
+* @return string Gadget description parsed into HTML
 */
public function getDescription() {
return wfMessage( "gadget-{$this->getName()}" )->parse();
}
 
/**
-* @return String: Wikitext of gadget description
+* @return string Wikitext of gadget description
 */
public function getRawDescription() {
return wfMessage( "gadget-{$this->getName()}" )->plain();
}
 
/**
-* @return String: Name of category (aka section) our gadget belongs 
to. Empty string if none.
+* @return string Name of category (aka section) our gadget belongs to. 
Empty string if none.
 */
public function getCategory() {
return $this->category;
@@ -154,8 +154,8 @@
/**
 * Checks whether this gadget is enabled for given user
 *
-* @param $user User: user to check against
-* @return Boolean
+* @param User $user user to check against
+* @return bool
 */
public function isEnabled( $user ) {
return (bool)$user->getOption( "gadget-{$this->name}", 
$this->onByDefault );
@@ -164,8 +164,8 @@
/**
 * Checks whether given user has permissions to use this gadget
 *
-* @param $user User: user to