C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355248 )

Change subject: Use the recommended `@param <type> <variable>` ordering in 
documentation
......................................................................

Use the recommended `@param <type> <variable>` ordering in documentation

Change-Id: I4f3601f34851ff43525b8ac3bbdf9a4691e2d3ef
---
M Collection.body.php
M Collection.hooks.php
M Collection.php
M Collection.session.php
M Collection.suggest.php
M RenderingAPI.php
6 files changed, 62 insertions(+), 62 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection 
refs/changes/48/355248/1

diff --git a/Collection.body.php b/Collection.body.php
index ca3f6a3..54deebc 100644
--- a/Collection.body.php
+++ b/Collection.body.php
@@ -24,7 +24,7 @@
        public $tempfile;
 
        /**
-        * @param $PODPartners bool|array
+        * @param bool|array $PODPartners
         */
        public function __construct( $PODPartners = false ) {
                parent::__construct( "Book" );
@@ -48,7 +48,7 @@
        }
 
        /**
-        * @param $par null|string
+        * @param null|string $par
         */
        public function execute( $par ) {
                global $wgCollectionMaxArticles;
@@ -491,8 +491,8 @@
        }
 
        /**
-        * @param $title string
-        * @param $subtitle string
+        * @param string $title
+        * @param string $subtitle
         */
        public static function setTitles( $title, $subtitle ) {
                $collection = CollectionSession::getCollection();
@@ -516,8 +516,8 @@
        }
 
        /**
-        * @param $a array
-        * @param $b array
+        * @param array $a
+        * @param array $b
         * @return int
         */
        public static function title_cmp( $a, $b ) {
@@ -549,7 +549,7 @@
        }
 
        /**
-        * @param $name string
+        * @param string $name
         */
        public static function addChapter( $name ) {
                $collection = CollectionSession::getCollection();
@@ -565,8 +565,8 @@
        }
 
        /**
-        * @param $index int
-        * @param $name string
+        * @param int $index
+        * @param string $name
         */
        public static function renameChapter( $index, $name ) {
                if ( !is_int( $index ) ) {
@@ -582,8 +582,8 @@
        }
 
        /**
-        * @param $namespace int
-        * @param $name string
+        * @param int $namespace
+        * @param string $name
         * @param int $oldid
         * @return bool
         */
@@ -596,8 +596,8 @@
        }
 
        /**
-        * @param $title Title
-        * @param $oldid int
+        * @param Title $title
+        * @param int $oldid
         * @return bool
         */
        public static function addArticle( $title, $oldid = 0 ) {
@@ -644,9 +644,9 @@
        }
 
        /**
-        * @param $namespace string
-        * @param $name string
-        * @param $oldid int
+        * @param string $namespace
+        * @param string $name
+        * @param int $oldid
         * @return bool
         */
        public static function removeArticleFromName( $namespace, $name, $oldid 
= 0 ) {
@@ -655,8 +655,8 @@
        }
 
        /**
-        * @param $title Title
-        * @param $oldid int
+        * @param Title $title
+        * @param int $oldid
         * @return bool
         */
        public static function removeArticle( $title, $oldid = 0 ) {
@@ -674,7 +674,7 @@
        }
 
        /**
-        * @param $name string
+        * @param string $name
         * @return bool
         */
        public static function addCategoryFromName( $name ) {
@@ -683,7 +683,7 @@
        }
 
        /**
-        * @param $title Title
+        * @param Title $title
         * @return bool
         */
        public static function addCategory( $title ) {
@@ -733,7 +733,7 @@
        }
 
        /**
-        * @param $index int
+        * @param int $index
         * @return bool
         */
        public static function removeItem( $index ) {
@@ -769,7 +769,7 @@
        }
 
        /**
-        * @param $items array
+        * @param array $items
         */
        public static function setSorting( $items ) {
                if ( !CollectionSession::hasSession() ) {
@@ -877,8 +877,8 @@
        }
 
        /**
-        * @param $title Title
-        * @param $append bool
+        * @param Title $title
+        * @param bool $append
         * @return array|bool
         */
        public function loadCollection( $title, $append = false ) {
@@ -922,8 +922,8 @@
        }
 
        /**
-        * @param $title Title
-        * @param $forceOverwrite bool
+        * @param Title $title
+        * @param bool $forceOverwrite
         * @return bool
         */
        public function saveCollection( $title, $forceOverwrite = false ) {
@@ -1003,10 +1003,10 @@
        /**
         * Take an array of arrays, each containing information about one item 
to be
         * assembled and exported, and appropriately feed the backend chosen 
($writer).
-        * @param $collection array following the collection/Metabook 
dictionary formats
+        * @param array $collection following the collection/Metabook 
dictionary formats
         * 
https://www.mediawiki.org/wiki/Offline_content_generator/metabook.json
         * https://mwlib.readthedocs.org/en/latest/internals.html#article
-        * @param $referrer Title object, used only to provide a returnto 
parameter.
+        * @param Title $referrer Used only to provide a returnto parameter.
         * @param $writer A writer registered in the appropriate configuration.
         */
        public function renderCollection( $collection, Title $referrer, $writer 
) {
@@ -1258,7 +1258,7 @@
         * Render a single page: fetch page name and revision information, then
         * assemble and feed to renderCollection() a single-item $collection.
         * @param $title Title needs to be full page name aka prefixed title.
-        * @param $oldid int
+        * @param int $oldid
         * @param $writer A writer registered in the appropriate configuration.
         * @return array|null
         */
diff --git a/Collection.hooks.php b/Collection.hooks.php
index 756390e..f48acbd 100644
--- a/Collection.hooks.php
+++ b/Collection.hooks.php
@@ -33,7 +33,7 @@
        /**
         * Callback for hook SkinBuildSidebar
         *
-        * @param $skin Skin
+        * @param Skin $skin
         * @param $bar
         *
         * @return bool
@@ -51,7 +51,7 @@
        }
 
        /**
-        * @param $skin Skin
+        * @param Skin $skin
         * @param $navUrls
         * @return bool
         */
@@ -68,7 +68,7 @@
        /**
         * Return HTML-code to be inserted as portlet
         *
-        * @param $sk Skin
+        * @param Skin $sk
         *
         * @return string
         */
@@ -157,7 +157,7 @@
        /**
         * Callback for hook SiteNoticeAfter
         * @param $siteNotice
-        * @param $skin Skin
+        * @param Skin $skin
         * @return bool
         */
        public static function siteNoticeAfter( &$siteNotice, $skin ) {
@@ -202,8 +202,8 @@
        }
 
        /**
-        * @param $title Title
-        * @param $mode string
+        * @param Title $title
+        * @param string $mode
         * @return string
         */
        public static function renderBookCreatorBox( $title, $mode = '' ) {
@@ -288,8 +288,8 @@
 
        /**
         * @param $title
-        * @param $ajaxHint null
-        * @param $oldid null|int
+        * @param $ajaxHint Defaults to null
+        * @param null|int $oldid
         * @return string
         */
        public static function getBookCreatorBoxContent( $title, $ajaxHint = 
null, $oldid = null ) {
@@ -305,7 +305,7 @@
        /**
         * @param $imagePath
         * @param $ajaxHint
-        * @param $title Title
+        * @param Title $title
         * @param $oldid
         * @return string
         */
@@ -476,7 +476,7 @@
 
        /**
         * OutputPageCheckLastModified hook
-        * @param $modifiedTimes array
+        * @param array $modifiedTimes
         * @return bool
         */
        public static function checkLastModified( $modifiedTimes ) {
diff --git a/Collection.php b/Collection.php
index cfebdcf..db48e1a 100644
--- a/Collection.php
+++ b/Collection.php
@@ -459,8 +459,8 @@
 
 /**
  * Backend of several following SAJAX function handlers...
- * @param String $action provided by the specific handlers internally
- * @param String $article title passed in from client
+ * @param string $action provided by the specific handlers internally
+ * @param string $article title passed in from client
  * @return AjaxResponse with JSON-encoded array including HTML fragment.
  */
 function wfCollectionSuggestAction( $action, $article ) {
diff --git a/Collection.session.php b/Collection.session.php
index a497b77..7985681 100644
--- a/Collection.session.php
+++ b/Collection.session.php
@@ -109,7 +109,7 @@
 
        /**
         * @param $title
-        * @param $oldid int
+        * @param int $oldid
         * @return int
         */
        public static function findArticle( $title, $oldid = 0 ) {
diff --git a/Collection.suggest.php b/Collection.suggest.php
index c737c0f..47c05b1 100644
--- a/Collection.suggest.php
+++ b/Collection.suggest.php
@@ -38,14 +38,14 @@
        /**
         * Main entrypoint
         *
-        * @param $mode (type string) 'add', 'ban' or 'remove'
+        * @param string $mode 'add', 'ban' or 'remove'
         *        'add' => add article to the book
         *        'ban' => ban article from the proposals
         *        'remove' => remove article from the book
         *        'addNum' => (type int) add the first $param articles to the 
collection
         *        'addVal' => (type float) add all propossals to the collection 
with
         *                    a value higher then $param
-        * @param $param (type string) name of the article to be added, banned 
or removed
+        * @param string|number $param name of the article to be added, banned 
or removed
         *        or a number of articles to add or a value (1 - 1.5) all 
articles with a
         *        higher value will be added to the collection
         */
@@ -65,14 +65,14 @@
        /**
         * Entrypoint for Ajax
         *
-        * @param $mode (type string) 'add', 'ban' or 'remove'
+        * @param string $mode 'add', 'ban' or 'remove'
         *        'add' => add article to the book
         *        'ban' => ban article from the proposals
         *        'remove' => remove article from the book
         *        'addNum' => (type int) add the first $param articles to the 
collection
         *        'addVal' => (type float) add all propossals to the collection 
with
         *                    a value higher then $param
-        * @param $param (type string) name of the article to be added, banned 
or removed
+        * @param string|number $param name of the article to be added, banned 
or removed
         *        or a number of articles to add or a value (1 - 1.5) all 
articles with a
         *        higher value will be added to the collection
         * @return string html-code for the proposallist and the memberlist
@@ -148,14 +148,14 @@
        /**
         * Update the session and return the template
         *
-        * @param $mode (type string) 'add', 'ban' or 'remove'
+        * @param string $mode 'add', 'ban' or 'remove'
         *        'add' => add article to the book
         *        'ban' => ban article from the proposals
         *        'remove' => remove article from the book
         *        'addNum' => (type int) add the first $param articles to the 
collection
         *        'addVal' => (type float) add all propossals to the collection 
with
         *                    a value higher then $param
-        * @param $param (type string) name of the article to be added, banned 
or removed
+        * @param string|number $param name of the article to be added, banned 
or removed
         *        or a number of articles to add or a value (1 - 1.5) all 
articles with a
         *        higher value will be added to the collection
         * @return CollectionSuggestTemplate the template for the wikipage
@@ -214,8 +214,8 @@
        /**
         * Add some articles and update the book of the Proposal-Object
         *
-        * @param $articleList array with the names of the articles to be added
-        * @param $prop CollectionProposals the proposal Object
+        * @param array $articleList with the names of the articles to be added
+        * @param CollectionProposals $prop the proposal Object
         */
        private static function addArticlesFromName( $articleList, $prop ) {
                foreach ( $articleList as $article ) {
@@ -263,9 +263,9 @@
         * constructor
         * ==================================================
         *
-        * @param $coll array the collection
-        * @param $ban array the list of the banned articles
-        * @param $props array the list of the proposals
+        * @param array $coll the collection
+        * @param array $ban the list of the banned articles
+        * @param array $props the list of the proposals
         */
        public function __construct( $coll, $ban, $props ) {
                $this->mPropList = array();
@@ -297,11 +297,11 @@
        /**
         * Calculate the new proposals and return it
         *
-        * @param $num (type int) number of proposals to be returned
+        * @param int $num number of proposals to be returned
         *        0 or less means, that all proposals will be returned
         *        this parameter is optional, the method will return
         *        all proposals by defaulted
-        * @param $doUpdate (type boolean) when true, $linkList will
+        * @param boolean $doUpdate when true, $linkList will
         *        updated before calculating the proposals
         *        default is true
         * @return array a 2-dimensional array that contains the proposals
@@ -390,7 +390,7 @@
        }
 
        /**
-        * @param $title Title
+        * @param Title $title
         * @return Title
         */
        private function resolveRedirects( $title ) {
@@ -405,8 +405,8 @@
        /**
         * Extract & count links from wikitext
         *
-        * @param $num_articles int
-        * @param $wikitext string article text
+        * @param int $num_articles
+        * @param string $wikitext article text
         * @return array with links and their weights
         */
        private function getWeightedLinks( $num_articles, $wikitext ) {
@@ -558,8 +558,8 @@
         * Search an article in an array and returns its key or false
         * if the array doesn't contain the article
         *
-        * @param $entry (type string) an articlename
-        * @param $array array to be searched, it has to 2-dimensional
+        * @param string $entry an articlename
+        * @param array $array to be searched, it has to 2-dimensional
         *               the 2nd dimension needs the key 'name'
         * @return bool|int the key as integer or false
         */
@@ -575,7 +575,7 @@
        /**
         * Check if an article is banned or belongs to the book/collection
         *
-        * @param $link string an articlename
+        * @param string $link an articlename
         * @return boolean true: if the article can be added to the proposals
         *                        false: if the article can't be added to the 
proposals
         */
diff --git a/RenderingAPI.php b/RenderingAPI.php
index 01ffb56..83bc287 100644
--- a/RenderingAPI.php
+++ b/RenderingAPI.php
@@ -171,7 +171,7 @@
        }
 
        /**
-        * @param $collection array
+        * @param array $collection
         * @return string
         */
        protected function buildJSONCollection( $collection ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f3601f34851ff43525b8ac3bbdf9a4691e2d3ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian <canan...@wikimedia.org>

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

Reply via email to