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 ) {
                if ( class_exists( 'SpecialCentralLogin' ) ) {
@@ -435,9 +443,10 @@
        /**
         * While experiement is running add Task suggestions link
         *  for logged in users who have made an edit
-        * @param array $personal_urls array of user toolbar links
-        * @param Title $title Title object for the current page
+        * @param array &$personal_urls array of user toolbar links
+        * @param Title &$title Title object for the current page
         * @param SkinTemplate $skinTemplate skin template object
+        * @return true
         */
        public static function onPersonalUrls( &$personal_urls, &$title, 
$skinTemplate ) {
                global $wgGettingStartedRunTest, $wgUser;
diff --git a/PageFilterFactory.php b/PageFilterFactory.php
index 12a6bb4..81dbfb9 100644
--- a/PageFilterFactory.php
+++ b/PageFilterFactory.php
@@ -9,6 +9,7 @@
         * @param string $taskName Task name
         * @param User $user User getting suggestions
         * @param Title $excludedTitle Title to exclude (optional)
+        * @return CategoryPageFilter|BasePageFilter
         */
        public static function getPageFilter( $taskName, \User $user, \Title 
$excludedTitle = null ) {
                global $wgGettingStartedCategoriesForTaskTypes;
diff --git a/RedisCategorySync.php b/RedisCategorySync.php
index a8efd66..6bef037 100644
--- a/RedisCategorySync.php
+++ b/RedisCategorySync.php
@@ -37,7 +37,7 @@
 
        /**
         * Acquire a Redis connection to a slave server.
-        * @returns RedisConnRef|bool Redis client or false.
+        * @return RedisConnRef|bool Redis client or false.
         */
        public static function getSlave() {
                return self::getClient();
@@ -45,7 +45,7 @@
 
        /**
         * Acquire a Redis connection to a master server.
-        * @returns RedisConnRef|bool Redis client or false.
+        * @return RedisConnRef|bool Redis client or false.
         */
        public static function getMaster() {
                return self::getClient( true );
@@ -54,7 +54,7 @@
        /**
         * Acquire a Redis connection.
         *
-        * @param bool Set to true to query a redis master server
+        * @param bool $master Set to true to query a redis master server
         * @return RedisConnRef|bool Redis client or false.
         */
        protected static function getClient( $master = false ) {
@@ -124,6 +124,7 @@
        /**
         * @param Category $category
         * @param WikiPage $page
+        * @return true
         */
        public static function onCategoryAfterPageAdded( Category $category, 
WikiPage $page ) {
                if ( self::isUpdateRelevant( $category, $page ) ) {
@@ -136,6 +137,7 @@
        /**
         * @param Category $category
         * @param WikiPage $page
+        * @return true
         */
        public static function onCategoryAfterPageRemoved( Category $category, 
WikiPage $page ) {
                if ( self::isUpdateRelevant( $category, $page ) ) {
@@ -152,7 +154,8 @@
         * @param WikiPage $article The article that was deleted
         * @param User $user The user that deleted the article
         * @param string $reason The reason that the article was deleted
-        * @param integer $id The ID of the article that was deleted
+        * @param int $id The ID of the article that was deleted
+        * @return true
         */
        public static function onArticleDeleteComplete( WikiPage $article, User 
$user, $reason, $id ) {
                // Currently only storing pages in main namespace
diff --git a/composer.json b/composer.json
index bf202bf..fd295f4 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,7 @@
        "scripts": {
                "fix": "phpcbf",
                "test": [
-                       "parallel-lint . --exclude vendor",
+                       "parallel-lint . --exclude vendor --exclude 
node_modules",
                        "phpcs -p -s"
                ]
        }
diff --git a/phpcs.xml b/phpcs.xml
index d7b5190..2596b17 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,10 +2,6 @@
 <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
                <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" 
/>
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
@@ -14,6 +10,4 @@
        <file>.</file>
        <arg name="extensions" value="php,php5,inc" />
        <arg name="encoding" value="UTF-8" />
-       <exclude-pattern>vendor</exclude-pattern>
-       <exclude-pattern>node_modules</exclude-pattern>
 </ruleset>

-- 
To view, visit https://gerrit.wikimedia.org/r/370825
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2eeb988788c567d118189273c16701c20ef60d00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to