Ricordisamoa has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/279318

Change subject: Clean up Doxygen tags
......................................................................

Clean up Doxygen tags

* Use "@param datatype $paramname description"
  and "@return datatype description" formats

* Capitalize descriptions

* Indent descriptions spanning multiple lines

Change-Id: I7ac38b3bed8f38c78c9ef0149dadb10cd59e5b31
---
M Babel.class.php
M BabelAutoCreate.class.php
M BabelLanguageCodes.class.php
M BabelStatic.class.php
4 files changed, 43 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Babel 
refs/changes/18/279318/1

diff --git a/Babel.class.php b/Babel.class.php
index 41241bc..d269421 100644
--- a/Babel.class.php
+++ b/Babel.class.php
@@ -27,7 +27,7 @@
         *
         * @param Parser $parser
         * @param string [$parameter,...]
-        * @return string: Babel tower.
+        * @return string Babel tower.
         */
        public static function Render( Parser $parser ) {
                global $wgBabelUseUserLanguage;
@@ -184,8 +184,8 @@
        /**
         * Identify whether or not a page exists.
         *
-        * @param $name String: Name of the page to check.
-        * @return Boolean: Indication of whether the page exists.
+        * @param string $name Name of the page to check.
+        * @return bool Indication of whether the page exists.
         */
        protected static function mPageExists( $name ) {
                $titleObj = Title::newFromText( $name );
@@ -196,8 +196,8 @@
        /**
         * Identify whether or not the passed string would make a valid page 
name.
         *
-        * @param $name string: Name of page to check.
-        * @return Boolean: Indication of whether or not the title is valid.
+        * @param string $name Name of page to check.
+        * @return bool Indication of whether or not the title is valid.
         */
        protected static function mValidTitle( $name ) {
                $titleObj = Title::newFromText( $name );
@@ -208,9 +208,9 @@
        /**
         * Parse a parameter, getting a language code and level.
         *
-        * @param $parameter String: Parameter.
-        * @param $strtolower Boolean: Whether to convert the language code to 
lowercase
-        * @return Array: { 'code' => xx, 'level' => xx }
+        * @param string $parameter Parameter.
+        * @param bool $strtolower Whether to convert the language code to 
lowercase
+        * @return array [ 'code' => xx, 'level' => xx ]
         */
        protected static function mParseParameter( $parameter, $strtolower = 
false ) {
                global $wgBabelDefaultLevel, $wgBabelCategoryNames;
@@ -251,8 +251,8 @@
        /**
         * Generate an inner item which is not a babel box.
         *
-        * @param $content String: what's inside the box, in wikitext format.
-        * @return String: A single non-babel box, in wikitext format.
+        * @param string $content What's inside the box, in wikitext format.
+        * @return string A single non-babel box, in wikitext format.
         */
        protected static function mGenerateNotaBox( $content ) {
                $dir_head = self::$title->getPageLanguage()->getDir();
@@ -266,9 +266,9 @@
        /**
         * Generate a babel box for the given language and level.
         *
-        * @param $code String: Language code to use.
-        * @param $level String or Integer: Level of ability to use.
-        * @return String: A single babel box, in wikitext format.
+        * @param string $code Language code to use.
+        * @param string|int $level Level of ability to use.
+        * @return string A single babel box, in wikitext format.
         */
        protected static function mGenerateBox( $code, $level ) {
                $lang = wfBCP47( $code );
@@ -316,10 +316,10 @@
         * Get the text to display in the language box for specific language and
         * level.
         *
-        * @param $name string
-        * @param $language String: Language code of language to use.
-        * @param $level String: Level to use.
-        * @return String: Text for display, in wikitext format.
+        * @param string $name
+        * @param string $language Language code of language to use.
+        * @param string $level Level to use.
+        * @return string Text for display, in wikitext format.
         */
        protected static function mGetText( $name, $language, $level ) {
                global $wgBabelMainCategory, $wgBabelCategoryNames;
@@ -363,11 +363,11 @@
        /**
         * Generate categories for the given language and level.
         *
-        * @param $code String: Language code to use.
-        * @param $level String or Integer: Level of ability to use.
-        * @param $createCategories Boolean: If true, creates non existing 
categories;
-        * otherwise, doesn't create them.
-        * @return String: Wikitext to add categories.
+        * @param string $code Language code to use.
+        * @param string|int $level Level of ability to use.
+        * @param bool $createCategories If true, creates non existing 
categories;
+        *  otherwise, doesn't create them.
+        * @return string Wikitext to add categories.
         */
        protected static function mGenerateCategories( $code, $level, 
$createCategories = true ) {
                global $wgBabelMainCategory, $wgBabelCategoryNames;
@@ -399,9 +399,9 @@
         * Replace the placeholder variables from the category names 
configurtion
         * array with actual values.
         *
-        * @param $category String: Category name (containing variables).
-        * @param $code String: Language code of category.
-        * @return String: Category name with variables replaced.
+        * @param string $category Category name (containing variables).
+        * @param string $code Language code of category.
+        * @return string Category name with variables replaced.
         */
        protected static function mReplaceCategoryVariables( $category, $code ) 
{
                global $wgLanguageCode;
@@ -417,10 +417,10 @@
        /**
         * Determine a CSS attribute, such as "border-spacing", from a 
localizeable message.
         *
-        * @param $name String: name of CSS attribute.
-        * @param $key String: Message key of attribute value.
-        * @param $assumeNumbersArePixels Boolean: if true, treat numbers 
values as pixels;
-        * otherwise, keep values as is (default: false).
+        * @param string $name Name of CSS attribute.
+        * @param string $key Message key of attribute value.
+        * @param bool $assumeNumbersArePixels If true, treat numbers values as 
pixels;
+        *  otherwise, keep values as is (default: false).
         * @todo Move this function to a more appropriate place, likely outside 
the class.
         * @return Message|string
         */
@@ -445,8 +445,8 @@
        /**
         * Determine an HTML attribute, such as "cellspacing" or "title", from 
a localizeable message.
         *
-        * @param $name String: name of HTML attribute.
-        * @param $key String: Message key of attribute value.
+        * @param string $name Name of HTML attribute.
+        * @param string $key Message key of attribute value.
         * TODO: move this function to a more appropriate place, likely outside 
the class.
         *       or consider to deprecate it as it's not used anymore.
         * @return Message|string
@@ -470,7 +470,7 @@
         * TODO There could be an API module that returns the result of this 
function
         *
         * @param User $user
-        * @param string $level minimal level as given in $wgBabelCategoryNames
+        * @param string $level Minimal level as given in $wgBabelCategoryNames
         * @return string[] List of language codes
         *
         * @since Version 1.9.0
diff --git a/BabelAutoCreate.class.php b/BabelAutoCreate.class.php
index 616e9ee..bf608d2 100644
--- a/BabelAutoCreate.class.php
+++ b/BabelAutoCreate.class.php
@@ -31,9 +31,9 @@
        /**
         * Create category.
         *
-        * @param $category String: Name of category to create.
-        * @param $code String: Code of language that the category is for.
-        * @param $level String: Level that the category is for.
+        * @param string $category Name of category to create.
+        * @param string $code Code of language that the category is for.
+        * @param string $level Level that the category is for.
         */
        public static function create( $category, $code, $level = null ) {
                $category = strip_tags( $category );
@@ -86,7 +86,7 @@
        /**
         * Get user object.
         *
-        * @return User object: User object for autocreate user.
+        * @return User User object for autocreate user.
         */
        public static function user() {
                if ( !self::$user ) {
diff --git a/BabelLanguageCodes.class.php b/BabelLanguageCodes.class.php
index 78bc59c..9dffeaf 100644
--- a/BabelLanguageCodes.class.php
+++ b/BabelLanguageCodes.class.php
@@ -17,8 +17,8 @@
         * checks the MediaWiki language codes for a match, otherwise checks the
         * Babel language codes CDB (preferring ISO 639-1 over ISO 639-3).
         *
-        * @param $code String: Code to try and get a "better" code for.
-        * @return String (language code) or false (invalid language code).
+        * @param string $code Code to try and get a "better" code for.
+        * @return string|bool Language code, or false for invalid language 
code.
         */
        public static function getCode( $code ) {
                $mediawiki = Language::fetchLanguageName( $code );
@@ -43,10 +43,10 @@
         * a given language via Language::fetchLanguageNames() or
         * else via the Babel language names CDB
         *
-        * @param $code String: Code to get name for.
-        * @param $language String: Code of language to attempt to get name in,
-        *                  defaults to language of code.
-        * @return String (name of language) or false (invalid language code).
+        * @param string $code Code to get name for.
+        * @param string $language Code of language to attempt to get name in,
+        *  defaults to language of code.
+        * @return string|bool Name of language, or false for invalid language 
code.
         */
        public static function getName( $code, $language = null ) {
                // Get correct code, even though it should already be correct.
diff --git a/BabelStatic.class.php b/BabelStatic.class.php
index 76854f6..50ba257 100644
--- a/BabelStatic.class.php
+++ b/BabelStatic.class.php
@@ -16,7 +16,7 @@
         *
         * @param $parser Parser
         *
-        * @return Boolean: True.
+        * @return bool True.
         */
        public static function onParserFirstCallInit( $parser ) {
                $parser->setFunctionHook( 'babel', [ 'Babel', 'Render' ] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ac38b3bed8f38c78c9ef0149dadb10cd59e5b31
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Babel
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to