[MediaWiki-commits] [Gerrit] mediawiki...GettingStarted[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/370825 )

Change subject: Improve some parameter docs
..


Improve some parameter docs

Change-Id: I2eeb988788c567d118189273c16701c20ef60d00
---
M CategoryPageSuggester.php
M Hooks.php
M PageFilterFactory.php
M RedisCategorySync.php
M composer.json
M phpcs.xml
6 files changed, 32 insertions(+), 24 deletions(-)

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



diff --git a/CategoryPageSuggester.php b/CategoryPageSuggester.php
index 1835f2d..509e47f 100644
--- a/CategoryPageSuggester.php
+++ b/CategoryPageSuggester.php
@@ -13,7 +13,8 @@
/**
 * Constructs a CategoryPageSuggester that uses the given category
 *
-* @param Category Category to use for suggestions
+* @param \RedisConnRef $redisConnection
+* @param \Category $category Category to use for suggestions
 */
public function __construct( \RedisConnRef $redisConnection, \Category 
$category ) {
$this->redisConnection = $redisConnection;
diff --git a/Hooks.php b/Hooks.php
index c4907f0..d1f4aa5 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -79,6 +79,7 @@
 *
 * @param WebRequest $request current request
 * @param Title $title title to check
+* @return array|null
 */
public static function getPageTask( WebRequest $request, Title $title ) 
{
self::initializeOpenTask( $request );
@@ -137,6 +138,8 @@
/**
 * Checks if page is the one the user returned to after account 
creation with
 * intent to show some onboarding flow.
+* @param OutputPage $out
+* @return bool
 */
protected static function isPostCreateReturn( OutputPage $out ) {
return $out->getRequest()->getFuzzyBool( 'gettingStartedReturn' 
);
@@ -147,6 +150,8 @@
 *
 * Depending on the page, this may do nothing (except log), or add a 
CTA with
 * one or two buttons.
+* @param OutputPage &$out
+* @param Skin &$skin
 */
protected static function addReturnToModules( &$out, &$skin ) {
$out->addModuleStyles( 'mediawiki.ui.button' );
@@ -165,8 +170,8 @@
 * If either of these (or both) are needed, set a request-specific
 * variable, wgGettingStarted.
 *
-* @param $vars array
-* @param $out OutputPage output page
+* @param array &$vars
+* @param OutputPage $out output page
 * @return bool
 */
public static function onMakeGlobalVariablesScript( &$vars, OutputPage 
$out ) {
@@ -344,9 +349,10 @@
 *
 * Called when user is on the 'You are now logged out.' page
 *
-* @param User $user user object of the now-anonymous user
-* @param string $inject_html reference that can be used to inject HTML 
into logout page.
+* @param User &$user user object of the now-anonymous user
+* @param string &$inject_html reference that can be used to inject 
HTML into logout page.
 * @param string $old_name name of user that just logged out
+* @return true
 */
public static function onUserLogoutComplete( &$user, &$inject_html, 
$old_name ) {
global $wgRequest;
@@ -364,10 +370,11 @@
 * account form, preventing the BeforeWelcomeCreation hook, it runs this
 * hook.  If user is not mobile, tweak the page returned to or its
 * parameters.
-* @param string $returnTo page name to redirect to
-* @param array $returnToQuery key value pairs of url parameters
-* @param boolean $stickHTTPS Keep redirect link on HTTPs
+* @param string &$returnTo page name to redirect to
+* @param array &$returnToQuery key value pairs of url parameters
+* @param bool $stickHTTPS Keep redirect link on HTTPs
 * @param string $type login redirect condition
+* @return true
 */
public static function onCentralAuthPostLoginRedirect(
&$returnTo, &$returnToQuery, $stickHTTPS, $type
@@ -388,9 +395,10 @@
/**
 * While being redirected after signup, determine if we should show 
getting started
 * if so set gettingStartedReturn param to true before the redirect
-* @param string $returnTo page name to redirect to
-* @param array $returnToQuery key value pairs of url parameters
-* @param string $type login redirect condition
+* @param string &$returnTo page name to redirect to
+* @param array &$returnToQuery key value pairs of url parameters
+* @param string &$type login redirect condition
+* @return true
 */
public static function onPostLoginRedirect( &$returnTo, 
&$returnToQuery, &$type ) {
if ( class_exists( 

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

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

Change subject: Improve some parameter docs
..

Improve some parameter docs

Change-Id: I2eeb988788c567d118189273c16701c20ef60d00
---
M CategoryPageSuggester.php
M Hooks.php
M PageFilterFactory.php
M RedisCategorySync.php
M composer.json
M phpcs.xml
6 files changed, 32 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/25/370825/1

diff --git a/CategoryPageSuggester.php b/CategoryPageSuggester.php
index 1835f2d..509e47f 100644
--- a/CategoryPageSuggester.php
+++ b/CategoryPageSuggester.php
@@ -13,7 +13,8 @@
/**
 * Constructs a CategoryPageSuggester that uses the given category
 *
-* @param Category Category to use for suggestions
+* @param \RedisConnRef $redisConnection
+* @param \Category $category Category to use for suggestions
 */
public function __construct( \RedisConnRef $redisConnection, \Category 
$category ) {
$this->redisConnection = $redisConnection;
diff --git a/Hooks.php b/Hooks.php
index c4907f0..d1f4aa5 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -79,6 +79,7 @@
 *
 * @param WebRequest $request current request
 * @param Title $title title to check
+* @return array|null
 */
public static function getPageTask( WebRequest $request, Title $title ) 
{
self::initializeOpenTask( $request );
@@ -137,6 +138,8 @@
/**
 * Checks if page is the one the user returned to after account 
creation with
 * intent to show some onboarding flow.
+* @param OutputPage $out
+* @return bool
 */
protected static function isPostCreateReturn( OutputPage $out ) {
return $out->getRequest()->getFuzzyBool( 'gettingStartedReturn' 
);
@@ -147,6 +150,8 @@
 *
 * Depending on the page, this may do nothing (except log), or add a 
CTA with
 * one or two buttons.
+* @param OutputPage &$out
+* @param Skin &$skin
 */
protected static function addReturnToModules( &$out, &$skin ) {
$out->addModuleStyles( 'mediawiki.ui.button' );
@@ -165,8 +170,8 @@
 * If either of these (or both) are needed, set a request-specific
 * variable, wgGettingStarted.
 *
-* @param $vars array
-* @param $out OutputPage output page
+* @param array &$vars
+* @param OutputPage $out output page
 * @return bool
 */
public static function onMakeGlobalVariablesScript( &$vars, OutputPage 
$out ) {
@@ -344,9 +349,10 @@
 *
 * Called when user is on the 'You are now logged out.' page
 *
-* @param User $user user object of the now-anonymous user
-* @param string $inject_html reference that can be used to inject HTML 
into logout page.
+* @param User &$user user object of the now-anonymous user
+* @param string &$inject_html reference that can be used to inject 
HTML into logout page.
 * @param string $old_name name of user that just logged out
+* @return true
 */
public static function onUserLogoutComplete( &$user, &$inject_html, 
$old_name ) {
global $wgRequest;
@@ -364,10 +370,11 @@
 * account form, preventing the BeforeWelcomeCreation hook, it runs this
 * hook.  If user is not mobile, tweak the page returned to or its
 * parameters.
-* @param string $returnTo page name to redirect to
-* @param array $returnToQuery key value pairs of url parameters
-* @param boolean $stickHTTPS Keep redirect link on HTTPs
+* @param string &$returnTo page name to redirect to
+* @param array &$returnToQuery key value pairs of url parameters
+* @param bool $stickHTTPS Keep redirect link on HTTPs
 * @param string $type login redirect condition
+* @return true
 */
public static function onCentralAuthPostLoginRedirect(
&$returnTo, &$returnToQuery, $stickHTTPS, $type
@@ -388,9 +395,10 @@
/**
 * While being redirected after signup, determine if we should show 
getting started
 * if so set gettingStartedReturn param to true before the redirect
-* @param string $returnTo page name to redirect to
-* @param array $returnToQuery key value pairs of url parameters
-* @param string $type login redirect condition
+* @param string &$returnTo page name to redirect to
+* @param array &$returnToQuery key value pairs of url parameters
+* @param string &$type login redirect condition
+* @return true
 */
public static function onPostLoginRedirect( &$returnTo, 
&$returnToQuery, &$type ) {