jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402649 )

Change subject: Improve some parameter docs
......................................................................


Improve some parameter docs

Change-Id: Ie83c1380e7804146090ca14ccd67bdd7efae4c2f
---
M .phpcs.xml
M InfoPage.php
M ListUsersTestWiki.php
M SpecialIncubatorFirstSteps.php
M SpecialSearchWiki.php
M WikimediaIncubator.class.php
6 files changed, 53 insertions(+), 9 deletions(-)

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



diff --git a/.phpcs.xml b/.phpcs.xml
index 73c6331..9cfdd4b 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -2,8 +2,6 @@
 <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
diff --git a/InfoPage.php b/InfoPage.php
index da613ce..24cfff9 100644
--- a/InfoPage.php
+++ b/InfoPage.php
@@ -140,6 +140,9 @@
        }
 
        /**
+        * @param string $beforetitle
+        * @param string $aftertitle
+        * @param string $content
         * @return String the core HTML for the info page
         */
        public function StandardInfoPage( $beforetitle, $aftertitle, $content ) 
{
diff --git a/ListUsersTestWiki.php b/ListUsersTestWiki.php
index 713b6aa..dcd4284 100644
--- a/ListUsersTestWiki.php
+++ b/ListUsersTestWiki.php
@@ -21,6 +21,9 @@
 
        /**
         * Input form
+        * @param Pager $pager
+        * @param string &$out
+        * @return true
         */
        static function onSpecialListusersHeaderForm( $pager, &$out ) {
                $testwiki = WikimediaIncubator::getUrlParam();
@@ -53,6 +56,9 @@
 
        /**
         * Query
+        * @param Pager $pager
+        * @param array &$query
+        * @return true
         */
        static function onSpecialListusersQueryInfo( $pager, &$query ) {
                $testwiki = WikimediaIncubator::getUrlParam();
diff --git a/SpecialIncubatorFirstSteps.php b/SpecialIncubatorFirstSteps.php
index 8090c65..685d6bf 100644
--- a/SpecialIncubatorFirstSteps.php
+++ b/SpecialIncubatorFirstSteps.php
@@ -47,6 +47,7 @@
         * @param Message $msg Message object
         * @param bool $opaque
         * @param bool $done
+        * @return string
         */
        protected function showHeader( $msg, $opaque = true, $done = false ) {
                $attrs = [];
diff --git a/SpecialSearchWiki.php b/SpecialSearchWiki.php
index 524d250..12ecfbb 100644
--- a/SpecialSearchWiki.php
+++ b/SpecialSearchWiki.php
@@ -98,6 +98,7 @@
        /**
         * @param string $projectQuery
         * @param string $languageQuery
+        * @return string
         */
        protected function doSearch( $projectQuery, $languageQuery ) {
                ## Match project ##
diff --git a/WikimediaIncubator.class.php b/WikimediaIncubator.class.php
index fb3241b..26f7a95 100644
--- a/WikimediaIncubator.class.php
+++ b/WikimediaIncubator.class.php
@@ -125,6 +125,7 @@
        /**
         * This validates a given language code.
         * Only "xx[x]" and "xx[x]-x[xxxxxxxx]" are allowed.
+        * @param string $code
         * @return bool
         */
        static function validateLanguageCode( $code ) {
@@ -278,7 +279,10 @@
        /**
         * display the prefix by the given project and code
         * (or the URL &testwiki= or user preference if no parameters are given)
-        * @return String
+        * @param string $project
+        * @param string $code
+        * @param bool $allowSister
+        * @return string
         */
        static function displayPrefix( $project = '', $code = '', $allowSister 
= false ) {
                global $wmincSisterProjects;
@@ -371,7 +375,11 @@
         * Disables editing pages belonging to existing wikis (+ shows message)
         * Disables creating an unprefixed page (+ shows error message)
         * See also: WikimediaIncubator::onShowMissingArticle()
-        * @return Boolean
+        * @param Title $title
+        * @param User $user
+        * @param string $action
+        * @param array &$result
+        * @return bool
         */
        static function onGetUserPermissionsErrors( $title, $user, $action, 
&$result ) {
                $titletext = $title->getText();
@@ -425,7 +433,11 @@
        /**
         * Return an error if the user wants to move
         * an existing page to an unprefixed title
-        * @return Boolean
+        * @param string $oldtitle
+        * @param string $newtitle
+        * @param User $user
+        * @param array &$error
+        * @return bool
         */
        static function checkPrefixMovePermissions( $oldtitle, $newtitle, 
$user, &$error ) {
                $status = new Status();
@@ -441,6 +453,10 @@
         * Add a link to Special:ViewUserLang from 
Special:Contributions/USERNAME
         * if the user has 'viewuserlang' permission
         * Based on code from extension LookupUser made by Tim Starling
+        * @param int $id
+        * @param Title $nt
+        * @param array &$links
+        * @param SpecialPage $sp
         */
        static function efLoadViewUserLangLink( $id, $nt, array &$links, 
SpecialPage $sp ) {
                if ( $sp->getUser()->isAllowed( 'viewuserlang' ) ) {
@@ -486,7 +502,7 @@
 
        /**
         * Do we know the databases of the existing wikis?
-        * @return Boolean
+        * @return bool
         */
        static function canWeCheckDB() {
                global $wmincExistingWikis, $wmincProjectDatabases;
@@ -556,6 +572,7 @@
         * If existing wiki: show message or redirect if &testwiki is set to 
that
         * Missing article on Wx/xx info pages: show welcome page
         * See also: WikimediaIncubator::onGetUserPermissionsErrors()
+        * @param Article $article
         * @return True
         */
        static function onShowMissingArticle( $article ) {
@@ -645,6 +662,7 @@
 
        /**
         * #infopage parser function
+        * @param Parser &$parser
         * @return array
         */
        public static function renderParserFunction( &$parser ) {
@@ -693,7 +711,9 @@
 
        /**
         * When creating a new info page, help the user by prefilling it
-        * @return True
+        * @param string &$text
+        * @param Title &$title
+        * @return true
         */
        public static function onEditFormPreloadText( &$text, &$title ) {
                $prefix = self::analyzePrefix( $title, true /* only info page 
*/,
@@ -741,7 +761,12 @@
 
        /**
         * Redirect if &goto=mainpage on info pages
-        * @return True
+        * @param OutputPage $output
+        * @param string $page
+        * @param Title $title
+        * @param User $user
+        * @param WebRequest $request
+        * @return true
         */
        public static function onMediaWikiPerformAction( $output, $page, 
$title, $user, $request ) {
                $prefix = self::analyzePrefix( $title, true );
@@ -815,7 +840,8 @@
         * if it is set in MediaWiki:Incubator-logo-wx-xxx
         * and if accessed through &testwiki=wx/xxx
         * or if the user preference is set to wx/xxx
-        * @return Boolean
+        * @param OutputPage &$out
+        * @return bool
         */
        static function fnTestWikiLogo( &$out ) {
                $setLogo = self::shouldWeSetCustomLogo( $out->getTitle() );
@@ -840,6 +866,8 @@
        /**
         * Make the page content language depend on the test wiki
         * Info pages are in the user language, they're localised
+        * @param Title $title
+        * @param string &$pageLang
         * @return true
         */
        static function onPageContentLanguage( $title, &$pageLang ) {
@@ -905,6 +933,9 @@
 
        /**
         * Search: Add an input form to enter a test wiki prefix.
+        * @param array &$showSections
+        * @param string $term
+        * @param array $opts
         * @return true
         */
        public static function onSpecialSearchPowerBox( &$showSections, $term, 
$opts ) {
@@ -915,6 +946,9 @@
 
        /**
         * Search: Search by default in the test wiki of the user's preference 
(or url &testwiki).
+        * @param SpecialSearch $search
+        * @param string $profile
+        * @param SearchEngine $engine
         * @return true
         */
        public static function onSpecialSearchSetupEngine( $search, $profile, 
$engine ) {
@@ -931,6 +965,7 @@
        /**
         * @param string $url
         * @param bool $callLinker Whether to call makeExternalLink()
+        * @return string
         */
        public static function makeExternalLinkText( $url, $callLinker = false 
) {
                # when displaying a URL, if it contains 'http://' or 'https://' 
it's ok to leave it,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie83c1380e7804146090ca14ccd67bdd7efae4c2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaIncubator
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to