From 55e8a9abfde03737d919185ef8e2bce83caa4c37 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 17 Apr 2014 15:31:28 +0200 Subject: [PATCH] Fixed some @params documentation (languages) Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Change-Id: I7a4dec6a8de96ee21ef34e52bb755f723aa3b0e6 --- languages/ConverterRule.php | 6 +- languages/Language.php | 583 ++++++++++++------------ languages/LanguageConverter.php | 28 +- languages/classes/LanguageAr.php | 2 +- languages/classes/LanguageAz.php | 2 +- languages/classes/LanguageBe_tarask.php | 4 +- languages/classes/LanguageBg.php | 2 +- languages/classes/LanguageBs.php | 4 +- languages/classes/LanguageCu.php | 4 +- languages/classes/LanguageDsb.php | 4 +- languages/classes/LanguageEo.php | 10 +- languages/classes/LanguageEs.php | 2 +- languages/classes/LanguageEt.php | 2 +- languages/classes/LanguageFi.php | 8 +- languages/classes/LanguageGa.php | 4 +- languages/classes/LanguageGan.php | 22 +- languages/classes/LanguageHe.php | 4 +- languages/classes/LanguageHsb.php | 4 +- languages/classes/LanguageHu.php | 4 +- languages/classes/LanguageHy.php | 6 +- languages/classes/LanguageIu.php | 22 +- languages/classes/LanguageJa.php | 4 +- languages/classes/LanguageKaa.php | 10 +- languages/classes/LanguageKk.php | 42 +- languages/classes/LanguageKk_cyrl.php | 18 +- languages/classes/LanguageKm.php | 2 +- languages/classes/LanguageKsh.php | 10 +- languages/classes/LanguageKu.php | 14 +- languages/classes/LanguageKu_ku.php | 2 +- languages/classes/LanguageLa.php | 4 +- languages/classes/LanguageMl.php | 2 +- languages/classes/LanguageMy.php | 2 +- languages/classes/LanguageOs.php | 4 +- languages/classes/LanguagePl.php | 2 +- languages/classes/LanguageQqx.php | 2 +- languages/classes/LanguageRu.php | 6 +- languages/classes/LanguageShi.php | 22 +- languages/classes/LanguageSl.php | 4 +- languages/classes/LanguageSr.php | 20 +- languages/classes/LanguageTr.php | 4 +- languages/classes/LanguageTyv.php | 4 +- languages/classes/LanguageUk.php | 6 +- languages/classes/LanguageWa.php | 16 +- languages/classes/LanguageYue.php | 4 +- languages/classes/LanguageZh.php | 28 +- languages/classes/LanguageZh_hans.php | 6 +- 46 files changed, 482 insertions(+), 483 deletions(-) diff --git a/languages/ConverterRule.php b/languages/ConverterRule.php index 40910413eb..a5e960f97e 100644 --- a/languages/ConverterRule.php +++ b/languages/ConverterRule.php @@ -206,7 +206,7 @@ class ConverterRule { * Parse rules conversion. * @private * - * @param $variant + * @param string $variant * * @return string */ @@ -251,8 +251,8 @@ class ConverterRule { * will be ignored and the original title is shown). * * @since 1.22 - * @param $variant The variant code to display page title in - * @return String|false The converted title or false if just page name + * @param string $variant The variant code to display page title in + * @return string|bool The converted title or false if just page name */ function getRuleConvertedTitle( $variant ) { if ( $variant === $this->mConverter->mMainLanguageCode ) { diff --git a/languages/Language.php b/languages/Language.php index 5ef781d190..6400786352 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -180,7 +180,7 @@ class Language { /** * Get a cached or new language object for a given language code - * @param $code String + * @param string $code * @return Language */ static function factory( $code ) { @@ -205,7 +205,7 @@ class Language { /** * Create a language object for a given language code - * @param $code String + * @param string $code * @throws MWException * @return Language */ @@ -276,8 +276,8 @@ class Language { * Based on regexes by Mark Davis of the Unicode Consortium: * http://unicode.org/repos/cldr/trunk/tools/java/org/unicode/cldr/util/data/langtagRegex.txt * - * @param $code string - * @param $lenient boolean Whether to allow '_' as separator. The default is only '-'. + * @param string $code + * @param bool $lenient Whether to allow '_' as separator. The default is only '-'. * * @return bool * @since 1.21 @@ -332,7 +332,7 @@ class Language { * not it exists. This includes codes which are used solely for * customisation via the MediaWiki namespace. * - * @param $code string + * @param string $code * * @return bool */ @@ -356,7 +356,7 @@ class Language { * Returns true if a language code is of a valid form for the purposes of * internal customisation of MediaWiki, via Messages*.php or *.json. * - * @param $code string + * @param string $code * * @throws MWException * @since 1.18 @@ -380,7 +380,7 @@ class Language { /** * Returns true if a language code is an IETF tag known to MediaWiki. * - * @param $code string + * @param string $code * * @since 1.21 * @return bool @@ -409,8 +409,8 @@ class Language { } /** - * @param $code - * @return String Name of the language class + * @param string $code + * @return string Name of the language class */ public static function classFromCode( $code ) { if ( $code == 'en' ) { @@ -423,7 +423,7 @@ class Language { /** * Includes language class files * - * @param $class string Name of the language class + * @param string $class Name of the language class */ public static function preloadLanguageClass( $class ) { global $IP; @@ -545,7 +545,7 @@ class Language { /** * Arbitrarily set all of the namespace names at once. Mainly used for testing - * @param $namespaces Array of namespaces (id => name) + * @param array $namespaces Array of namespaces (id => name) */ public function setNamespaces( array $namespaces ) { $this->namespaceNames = $namespaces; @@ -584,8 +584,8 @@ class Language { * echo $mw_ns; // prints 'MediaWiki' * * - * @param $index Int: the array key of the namespace to return - * @return mixed, string if the namespace value exists, otherwise false + * @param int $index The array key of the namespace to return + * @return string|bool String if the namespace value exists, otherwise false */ function getNsText( $index ) { $ns = $this->getNamespaces(); @@ -613,9 +613,9 @@ class Language { /** * Returns gender-dependent namespace alias if available. * See https://www.mediawiki.org/wiki/Manual:$wgExtraGenderNamespaces - * @param $index Int: namespace index - * @param $gender String: gender key (male, female... ) - * @return String + * @param int $index Namespace index + * @param string $gender Gender key (male, female... ) + * @return string * @since 1.18 */ function getGenderNsText( $index, $gender ) { @@ -652,8 +652,8 @@ class Language { * Only matches namespace names for the current language, not the * canonical ones defined in Namespace.php. * - * @param $text String - * @return mixed An integer if $text is a valid value otherwise false + * @param string $text + * @return int|bool An integer if $text is a valid value otherwise false */ function getLocalNsIndex( $text ) { $lctext = $this->lc( $text ); @@ -733,8 +733,8 @@ class Language { * Get a namespace key by value, case insensitive. Canonical namespace * names override custom ones defined for the current language. * - * @param $text String - * @return mixed An integer if $text is a valid value otherwise false + * @param string $text + * @return int|bool An integer if $text is a valid value otherwise false */ function getNsIndex( $text ) { $lctext = $this->lc( $text ); @@ -749,8 +749,8 @@ class Language { /** * short names for language variants used for language conversion links. * - * @param $code String - * @param $usemsg bool Use the "variantname-xyz" message if it exists + * @param string $code + * @param bool $usemsg Use the "variantname-xyz" message if it exists * @return string */ function getVariantname( $code, $usemsg = true ) { @@ -768,7 +768,7 @@ class Language { } /** - * @param $name string + * @param string $name * @return string */ function specialPage( $name ) { @@ -814,7 +814,7 @@ class Language { } /** - * @param $image + * @param string $image * @return array|null */ function getImageFile( $image ) { @@ -829,7 +829,7 @@ class Language { } /** - * @param $tog + * @param string $tog * @return string */ function getUserToggle( $tog ) { @@ -841,7 +841,7 @@ class Language { * Only those defined in MediaWiki, no other data like CLDR. * If $customisedOnly is true, only returns codes with a messages file * - * @param $customisedOnly bool + * @param bool $customisedOnly * * @return array * @deprecated since 1.20, use fetchLanguageNames() @@ -854,8 +854,8 @@ class Language { * Get translated language names. This is done on best effort and * by default this is exactly the same as Language::getLanguageNames. * The CLDR extension provides translated names. - * @param $code String Language code. - * @return Array language code => language name + * @param string $code Language code. + * @return array Language code => language name * @since 1.18.0 * @deprecated since 1.20, use fetchLanguageNames() */ @@ -865,13 +865,13 @@ class Language { /** * Get an array of language names, indexed by code. - * @param $inLanguage null|string: Code of language in which to return the names + * @param null|string $inLanguage Code of language in which to return the names * Use null for autonyms (native names) - * @param $include string: + * @param string $include One of: * 'all' all available languages * 'mw' only if the language is defined in MediaWiki or wgExtraLanguageNames (default) * 'mwfile' only if the language is in 'mw' *and* has a message file - * @return array: language code => language name + * @return array Language code => language name * @since 1.20 */ public static function fetchLanguageNames( $inLanguage = null, $include = 'mw' ) { @@ -929,10 +929,10 @@ class Language { } /** - * @param $code string: The code of the language for which to get the name - * @param $inLanguage null|string: Code of language in which to return the name (null for autonyms) - * @param $include string: 'all', 'mw' or 'mwfile'; see fetchLanguageNames() - * @return string: Language name or empty + * @param string $code The code of the language for which to get the name + * @param null|string $inLanguage Code of language in which to return the name (null for autonyms) + * @param string $include 'all', 'mw' or 'mwfile'; see fetchLanguageNames() + * @return string Language name or empty * @since 1.20 */ public static function fetchLanguageName( $code, $inLanguage = null, $include = 'all' ) { @@ -944,7 +944,7 @@ class Language { /** * Get a message from the MediaWiki namespace. * - * @param $msg String: message name + * @param string $msg Message name * @return string */ function getMessageFromDB( $msg ) { @@ -954,7 +954,7 @@ class Language { /** * Get the native language name of $code. * Only if defined in MediaWiki, no other data like CLDR. - * @param $code string + * @param string $code * @return string * @deprecated since 1.20, use fetchLanguageName() */ @@ -963,7 +963,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getMonthName( $key ) { @@ -982,7 +982,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getMonthNameGen( $key ) { @@ -990,7 +990,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getMonthAbbreviation( $key ) { @@ -1009,7 +1009,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getWeekdayName( $key ) { @@ -1017,7 +1017,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getWeekdayAbbreviation( $key ) { @@ -1025,7 +1025,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getIranianCalendarMonthName( $key ) { @@ -1033,7 +1033,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getHebrewCalendarMonthName( $key ) { @@ -1041,7 +1041,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getHebrewCalendarMonthNameGen( $key ) { @@ -1049,7 +1049,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ function getHijriCalendarMonthName( $key ) { @@ -1111,11 +1111,11 @@ class Language { * time zone, if any. Note that the format characters crUeIOPTZ will assume * $ts is UTC if $zone is not given. * - * @param $format String - * @param $ts String: 14-character timestamp + * @param string $format + * @param string $ts 14-character timestamp * YYYYMMDDHHMMSS * 01234567890123 - * @param $zone DateTimeZone: Timezone of $ts + * @param DateTimeZone $zone Timezone of $ts * @todo handling of "o" format character for Iranian, Hebrew, Hijri & Thai? * * @throws MWException @@ -1435,7 +1435,7 @@ class Language { * * Link: http://www.farsiweb.info/jalali/jalali.c * - * @param $ts string + * @param string $ts * * @return string */ @@ -1493,7 +1493,7 @@ class Language { * * @see http://phpnuke.org/modules.php?name=News&file=article&sid=8234&mode=thread&order=0&thold=0 * - * @param $ts string + * @param string $ts * * @return string */ @@ -1543,7 +1543,7 @@ class Language { * The months are counted from Tishrei = 1. In a leap year, Adar I is 13 * and Adar II is 14. In a non-leap year, Adar is 6. * - * @param $ts string + * @param string $ts * * @return string */ @@ -1684,7 +1684,7 @@ class Language { * Based on Carl Friedrich Gauss algorithm for finding Easter date. * Used for Hebrew date. * - * @param $year int + * @param int $year * * @return string */ @@ -1722,9 +1722,9 @@ class Language { * http://en.wikipedia.org/wiki/Minguo_calendar * http://en.wikipedia.org/wiki/Japanese_era_name * - * @param $ts String: 14-character timestamp - * @param $cName String: calender name - * @return Array: converted year, month, day + * @param string $ts 14-character timestamp + * @param string $cName Calender name + * @return array Converted year, month, day */ private static function tsToYear( $ts, $cName ) { $gy = substr( $ts, 0, 4 ); @@ -1799,7 +1799,7 @@ class Language { /** * Roman number formatting up to 10000 * - * @param $num int + * @param int $num * * @return string */ @@ -1829,7 +1829,7 @@ class Language { /** * Hebrew Gematria number formatting up to 9999 * - * @param $num int + * @param int $num * * @return string */ @@ -1892,9 +1892,9 @@ class Language { /** * Used by date() and time() to adjust the time output. * - * @param $ts Int the time in date('YmdHis') format - * @param $tz Mixed: adjust the time by this amount (default false, mean we - * get user timecorrection setting) + * @param int $ts The time in date('YmdHis') format + * @param mixed $tz Adjust the time by this amount (default false, mean we + * get user timecorrection setting) * @return int */ function userAdjust( $ts, $tz = false ) { @@ -1977,9 +1977,9 @@ class Language { * } * * - * @param $usePrefs Mixed: if true, the user's preference is used - * if false, the site/language default is used - * if int/string, assumed to be a format. + * @param int|string|bool $usePrefs If true, the user's preference is used + * if false, the site/language default is used + * if int/string, assumed to be a format. * @return string */ function dateFormat( $usePrefs = true ) { @@ -2005,8 +2005,8 @@ class Language { /** * Get a format string for a given type and preference - * @param $type string May be date, time or both - * @param $pref string The format name as it appears in Messages*.php + * @param string $type May be date, time or both + * @param string $pref The format name as it appears in Messages*.php * * @since 1.22 New type 'pretty' that provides a more readable timestamp format * @@ -2035,13 +2035,13 @@ class Language { } /** - * @param $ts Mixed: the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param $adj Bool: whether to adjust the time output according to the - * user configured offset ($timecorrection) - * @param $format Mixed: true to use user's date format preference - * @param $timecorrection String|bool the time offset as returned by - * validateTimeZone() in Special:Preferences + * @param mixed $ts The time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param bool $adj Whether to adjust the time output according to the + * user configured offset ($timecorrection) + * @param mixed $format True to use user's date format preference + * @param string|bool $timecorrection The time offset as returned by + * validateTimeZone() in Special:Preferences * @return string */ function date( $ts, $adj = false, $format = true, $timecorrection = false ) { @@ -2054,13 +2054,13 @@ class Language { } /** - * @param $ts Mixed: the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param $adj Bool: whether to adjust the time output according to the - * user configured offset ($timecorrection) - * @param $format Mixed: true to use user's date format preference - * @param $timecorrection String|bool the time offset as returned by - * validateTimeZone() in Special:Preferences + * @param mixed $ts The time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param bool $adj Whether to adjust the time output according to the + * user configured offset ($timecorrection) + * @param mixed $format True to use user's date format preference + * @param string|bool $timecorrection The time offset as returned by + * validateTimeZone() in Special:Preferences * @return string */ function time( $ts, $adj = false, $format = true, $timecorrection = false ) { @@ -2073,14 +2073,14 @@ class Language { } /** - * @param $ts Mixed: the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param $adj Bool: whether to adjust the time output according to the - * user configured offset ($timecorrection) - * @param $format Mixed: what format to return, if it's false output the - * default one (default true) - * @param $timecorrection String|bool the time offset as returned by - * validateTimeZone() in Special:Preferences + * @param mixed $ts The time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param bool $adj Whether to adjust the time output according to the + * user configured offset ($timecorrection) + * @param mixed $format What format to return, if it's false output the + * default one (default true) + * @param string|bool $timecorrection The time offset as returned by + * validateTimeZone() in Special:Preferences * @return string */ function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) { @@ -2097,7 +2097,7 @@ class Language { * * @since 1.20 * - * @param integer $seconds The amount of seconds. + * @param int $seconds The amount of seconds. * @param array $chosenIntervals The intervals to enable. * * @return string @@ -2123,7 +2123,7 @@ class Language { * * @since 1.20 * - * @param integer $seconds The amount of seconds. + * @param int $seconds The amount of seconds. * @param array $chosenIntervals The intervals to enable. * * @return array @@ -2154,21 +2154,21 @@ class Language { /** * Internal helper function for userDate(), userTime() and userTimeAndDate() * - * @param $type String: can be 'date', 'time' or 'both' - * @param $ts Mixed: the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param $user User object used to get preferences for timezone and format - * @param $options Array, can contain the following keys: - * - 'timecorrection': time correction, can have the following values: - * - true: use user's preference - * - false: don't use time correction - * - integer: value of time correction in minutes - * - 'format': format to use, can have the following values: - * - true: use user's preference - * - false: use default preference - * - string: format to use + * @param string $type Can be 'date', 'time' or 'both' + * @param mixed $ts The time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param User $user User object used to get preferences for timezone and format + * @param array $options Array, can contain the following keys: + * - 'timecorrection': time correction, can have the following values: + * - true: use user's preference + * - false: don't use time correction + * - int: value of time correction in minutes + * - 'format': format to use, can have the following values: + * - true: use user's preference + * - false: use default preference + * - string: format to use * @since 1.19 - * @return String + * @return string */ private function internalUserTimeAndDate( $type, $ts, User $user, array $options ) { $ts = wfTimestamp( TS_MW, $ts ); @@ -2194,20 +2194,20 @@ class Language { * Get the formatted date for the given timestamp and formatted for * the given user. * - * @param $ts Mixed: the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param $user User object used to get preferences for timezone and format - * @param $options Array, can contain the following keys: - * - 'timecorrection': time correction, can have the following values: - * - true: use user's preference - * - false: don't use time correction - * - integer: value of time correction in minutes - * - 'format': format to use, can have the following values: - * - true: use user's preference - * - false: use default preference - * - string: format to use + * @param mixed $ts Mixed: the time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param User $user User object used to get preferences for timezone and format + * @param array $options Array, can contain the following keys: + * - 'timecorrection': time correction, can have the following values: + * - true: use user's preference + * - false: don't use time correction + * - int: value of time correction in minutes + * - 'format': format to use, can have the following values: + * - true: use user's preference + * - false: use default preference + * - string: format to use * @since 1.19 - * @return String + * @return string */ public function userDate( $ts, User $user, array $options = array() ) { return $this->internalUserTimeAndDate( 'date', $ts, $user, $options ); @@ -2217,20 +2217,20 @@ class Language { * Get the formatted time for the given timestamp and formatted for * the given user. * - * @param $ts Mixed: the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param $user User object used to get preferences for timezone and format - * @param $options Array, can contain the following keys: - * - 'timecorrection': time correction, can have the following values: - * - true: use user's preference - * - false: don't use time correction - * - integer: value of time correction in minutes - * - 'format': format to use, can have the following values: - * - true: use user's preference - * - false: use default preference - * - string: format to use + * @param mixed $ts The time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param User $user User object used to get preferences for timezone and format + * @param array $options Array, can contain the following keys: + * - 'timecorrection': time correction, can have the following values: + * - true: use user's preference + * - false: don't use time correction + * - int: value of time correction in minutes + * - 'format': format to use, can have the following values: + * - true: use user's preference + * - false: use default preference + * - string: format to use * @since 1.19 - * @return String + * @return string */ public function userTime( $ts, User $user, array $options = array() ) { return $this->internalUserTimeAndDate( 'time', $ts, $user, $options ); @@ -2240,20 +2240,20 @@ class Language { * Get the formatted date and time for the given timestamp and formatted for * the given user. * - * @param $ts Mixed: the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param $user User object used to get preferences for timezone and format - * @param $options Array, can contain the following keys: - * - 'timecorrection': time correction, can have the following values: - * - true: use user's preference - * - false: don't use time correction - * - integer: value of time correction in minutes - * - 'format': format to use, can have the following values: - * - true: use user's preference - * - false: use default preference - * - string: format to use + * @param mixed $ts the time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param User $user User object used to get preferences for timezone and format + * @param array $options Array, can contain the following keys: + * - 'timecorrection': time correction, can have the following values: + * - true: use user's preference + * - false: don't use time correction + * - int: value of time correction in minutes + * - 'format': format to use, can have the following values: + * - true: use user's preference + * - false: use default preference + * - string: format to use * @since 1.19 - * @return String + * @return string */ public function userTimeAndDate( $ts, User $user, array $options = array() ) { return $this->internalUserTimeAndDate( 'both', $ts, $user, $options ); @@ -2335,7 +2335,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return array|null */ function getMessage( $key ) { @@ -2350,9 +2350,9 @@ class Language { } /** - * @param $in - * @param $out - * @param $string + * @param string $in + * @param string $out + * @param string $string * @return string */ function iconv( $in, $out, $string ) { @@ -2372,7 +2372,7 @@ class Language { // callback functions for uc(), lc(), ucwords(), ucwordbreaks() /** - * @param $matches array + * @param array $matches * @return mixed|string */ function ucwordbreaksCallbackAscii( $matches ) { @@ -2380,7 +2380,7 @@ class Language { } /** - * @param $matches array + * @param array $matches * @return string */ function ucwordbreaksCallbackMB( $matches ) { @@ -2388,7 +2388,7 @@ class Language { } /** - * @param $matches array + * @param array $matches * @return string */ function ucCallback( $matches ) { @@ -2397,7 +2397,7 @@ class Language { } /** - * @param $matches array + * @param array $matches * @return string */ function lcCallback( $matches ) { @@ -2406,7 +2406,7 @@ class Language { } /** - * @param $matches array + * @param array $matches * @return string */ function ucwordsCallbackMB( $matches ) { @@ -2414,7 +2414,7 @@ class Language { } /** - * @param $matches array + * @param array $matches * @return string */ function ucwordsCallbackWiki( $matches ) { @@ -2425,7 +2425,7 @@ class Language { /** * Make a string's first character uppercase * - * @param $str string + * @param string $str * * @return string */ @@ -2444,8 +2444,8 @@ class Language { /** * Convert a string to uppercase * - * @param $str string - * @param $first bool + * @param string $str + * @param bool $first * * @return string */ @@ -2475,7 +2475,7 @@ class Language { } /** - * @param $str string + * @param string $str * @return mixed|string */ function lcfirst( $str ) { @@ -2493,8 +2493,8 @@ class Language { } /** - * @param $str string - * @param $first bool + * @param string $str + * @param bool $first * @return mixed|string */ function lc( $str, $first = false ) { @@ -2523,7 +2523,7 @@ class Language { } /** - * @param $str string + * @param string $str * @return bool */ function isMultibyte( $str ) { @@ -2531,7 +2531,7 @@ class Language { } /** - * @param $str string + * @param string $str * @return mixed|string */ function ucwords( $str ) { @@ -2563,7 +2563,7 @@ class Language { /** * capitalize words at word breaks * - * @param $str string + * @param string $str * @return mixed */ function ucwordbreaks( $str ) { @@ -2609,7 +2609,7 @@ class Language { * uses this function when it should be using a more general normalisation * function, then fix the caller. * - * @param $s string + * @param string $s * * @return string */ @@ -2618,7 +2618,7 @@ class Language { } /** - * @param $s string + * @param string $s * @return string */ function checkTitleEncoding( $s ) { @@ -2655,8 +2655,8 @@ class Language { * Some languages such as Chinese require word segmentation, * Specify such segmentation when overridden in derived class. * - * @param $string String - * @return String + * @param string $string + * @return string */ function segmentByWord( $string ) { return $string; @@ -2666,8 +2666,8 @@ class Language { * Some languages have special punctuation need to be normalized. * Make such changes here. * - * @param $string String - * @return String + * @param string $string + * @return string */ function normalizeForSearch( $string ) { return self::convertDoubleWidth( $string ); @@ -2677,7 +2677,7 @@ class Language { * convert double-width roman characters to single-width. * range: ff00-ff5f ~= 0020-007f * - * @param $string string + * @param string $string * * @return string */ @@ -2697,8 +2697,8 @@ class Language { } /** - * @param $string string - * @param $pattern string + * @param string $string + * @param string $pattern * @return string */ protected static function insertSpace( $string, $pattern ) { @@ -2708,7 +2708,7 @@ class Language { } /** - * @param $termsArray array + * @param array $termsArray * @return array */ function convertForSearchResult( $termsArray ) { @@ -2720,7 +2720,7 @@ class Language { /** * Get the first character of a string. * - * @param $s string + * @param string $s * @return string */ function firstChar( $s ) { @@ -2783,7 +2783,7 @@ class Language { } /** - * @param $s string + * @param string $s * @return string */ function recodeForEdit( $s ) { @@ -2799,7 +2799,7 @@ class Language { } /** - * @param $s string + * @param string $s * @return string */ function recodeInput( $s ) { @@ -2824,7 +2824,7 @@ class Language { * * This is language-specific for performance reasons only. * - * @param $s string + * @param string $s * * @return string */ @@ -2847,8 +2847,8 @@ class Language { * The data is cached in process memory. This will go faster if you have the * FastStringSearch extension. * - * @param $file string - * @param $string string + * @param string $file + * @param string $string * * @throws MWException * @return string @@ -2875,7 +2875,7 @@ class Language { /** * Return the correct HTML 'dir' attribute value for this language. - * @return String + * @return string */ function getDir() { return $this->isRTL() ? 'rtl' : 'ltr'; @@ -2887,7 +2887,7 @@ class Language { * * Should be equivalent to CSS3 'start' text-align value.... * - * @return String + * @return string */ function alignStart() { return $this->isRTL() ? 'right' : 'left'; @@ -2899,7 +2899,7 @@ class Language { * * Should be equivalent to CSS3 'end' text-align value.... * - * @return String + * @return string */ function alignEnd() { return $this->isRTL() ? 'left' : 'right'; @@ -2912,7 +2912,7 @@ class Language { * because it makes the output HTML source code more readable. When * the output is plain text or can be escaped, getDirMark() should be used. * - * @param $opposite Boolean Get the direction mark opposite to your language + * @param bool $opposite Get the direction mark opposite to your language * @return string * @since 1.20 */ @@ -2930,7 +2930,7 @@ class Language { * when the output is plain text or can be escaped. When the output is * HTML, use getDirMarkEntity() instead. * - * @param $opposite Boolean Get the direction mark opposite to your language + * @param bool $opposite Get the direction mark opposite to your language * @return string */ function getDirMark( $opposite = false ) { @@ -2952,7 +2952,7 @@ class Language { /** * An arrow, depending on the language direction. * - * @param $direction String: the direction of the arrow: forwards (default), backwards, left, right, up, down. + * @param string $direction The direction of the arrow: forwards (default), backwards, left, right, up, down. * @return string */ function getArrow( $direction = 'forwards' ) { @@ -3005,7 +3005,7 @@ class Language { /** * Fill a MagicWord object with data from here * - * @param $mw + * @param MagicWord $mw */ function getMagic( $mw ) { // Saves a function call @@ -3031,7 +3031,7 @@ class Language { /** * Add magic words to the extension array * - * @param $newWords array + * @param array $newWords */ function addMagicWordsByLang( $newWords ) { $fallbackChain = $this->getFallbackLanguages(); @@ -3063,7 +3063,7 @@ class Language { /** * Italic is unsuitable for some languages * - * @param $text String: the text to be emphasized. + * @param string $text The text to be emphasized. * @return string */ function emphasize( $text ) { @@ -3086,11 +3086,10 @@ class Language { * See $separatorTransformTable on MessageIs.php for * the , => . and . => , implementation. * - * @todo check if it's viable to use localeconv() for the decimal - * separator thing. - * @param $number Mixed: the string to be formatted, should be an integer - * or a floating point number. - * @param $nocommafy Bool: set to true for special numbers like dates + * @todo check if it's viable to use localeconv() for the decimal separator thing. + * @param int|float $number The string to be formatted, should be an integer + * or a floating point number. + * @param bool $nocommafy Set to true for special numbers like dates * @return string */ public function formatNum( $number, $nocommafy = false ) { @@ -3116,7 +3115,7 @@ class Language { /** * Front-end for non-commafied formatNum * - * @param mixed $number the string to be formatted, should be an integer + * @param int|float $number The string to be formatted, should be an integer * or a floating point number. * @since 1.21 * @return string @@ -3126,7 +3125,7 @@ class Language { } /** - * @param $number string + * @param string $number * @return string */ function parseFormattedNumber( $number ) { @@ -3147,7 +3146,7 @@ class Language { /** * Adds commas to a given number * @since 1.19 - * @param $number mixed + * @param mixed $number * @return string */ function commafy( $number ) { @@ -3200,7 +3199,7 @@ class Language { } /** - * @return String + * @return string */ function digitGroupingPattern() { return self::$dataCache->getItem( $this->mCode, 'digitGroupingPattern' ); @@ -3226,7 +3225,7 @@ class Language { * The last two strings are chained with an "and". * NOTE: This function will only work with standard numeric array keys (0, 1, 2…) * - * @param $l Array + * @param string[] $l * @return string */ function listToText( array $l ) { @@ -3255,7 +3254,7 @@ class Language { /** * Take a list of strings and build a locale-friendly comma-separated * list, using the local comma-separator message. - * @param $list array of strings to put in a comma list + * @param string[] $list Array of strings to put in a comma list * @return string */ function commaList( array $list ) { @@ -3268,7 +3267,7 @@ class Language { /** * Take a list of strings and build a locale-friendly semicolon-separated * list, using the local semicolon-separator message. - * @param $list array of strings to put in a semicolon list + * @param string[] $list Array of strings to put in a semicolon list * @return string */ function semicolonList( array $list ) { @@ -3280,7 +3279,7 @@ class Language { /** * Same as commaList, but separate it with the pipe instead. - * @param $list array of strings to put in a pipe list + * @param string[] $list Array of strings to put in a pipe list * @return string */ function pipeList( array $list ) { @@ -3300,10 +3299,10 @@ class Language { * * If $length is negative, the string will be truncated from the beginning * - * @param $string String to truncate - * @param $length Int: maximum length (including ellipses) - * @param $ellipsis String to append to the truncated text - * @param $adjustLength Boolean: Subtract length of ellipsis from $length. + * @param string $string String to truncate + * @param int $length Maximum length (including ellipses) + * @param string $ellipsis String to append to the truncated text + * @param bool $adjustLength Subtract length of ellipsis from $length. * $adjustLength was introduced in 1.18, before that behaved as if false. * @return string */ @@ -3353,7 +3352,7 @@ class Language { * Remove bytes that represent an incomplete Unicode character * at the end of string (e.g. bytes of the char are missing) * - * @param $string String + * @param string $string * @return string */ protected function removeBadCharLast( $string ) { @@ -3378,7 +3377,7 @@ class Language { * Remove bytes that represent an incomplete Unicode character * at the start of string (e.g. bytes of the char are missing) * - * @param $string String + * @param string $string * @return string */ protected function removeBadCharFirst( $string ) { @@ -3518,11 +3517,11 @@ class Language { * truncateHtml() helper function * like strcspn() but adds the skipped chars to $ret * - * @param $ret - * @param $text - * @param $search - * @param $start - * @param $len + * @param string $ret + * @param string $text + * @param string $search + * @param int $start + * @param null|int $len * @return int */ private function truncate_skip( &$ret, $text, $search, $start, $len = null ) { @@ -3543,10 +3542,10 @@ class Language { * truncateHtml() helper function * (a) push or pop $tag from $openTags as needed * (b) clear $tag value - * @param &$tag string Current HTML tag name we are looking at - * @param $tagType int (0-open tag, 1-close tag) - * @param $lastCh string Character before the '>' that ended this tag - * @param &$openTags array Open tag stack (not accounting for $tag) + * @param string &$tag Current HTML tag name we are looking at + * @param int $tagType (0-open tag, 1-close tag) + * @param string $lastCh Character before the '>' that ended this tag + * @param array &$openTags Open tag stack (not accounting for $tag) */ private function truncate_endBracket( &$tag, $tagType, $lastCh, &$openTags ) { $tag = ltrim( $tag ); @@ -3566,8 +3565,8 @@ class Language { * Grammatical transformations, needed for inflected languages * Invoked by putting {{grammar:case|word}} in a message * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { @@ -3579,7 +3578,7 @@ class Language { } /** * Get the grammar forms for the content language - * @return array of grammar forms + * @return array Array of grammar forms * @since 1.20 */ function getGrammarForms() { @@ -3603,8 +3602,8 @@ class Language { * If fewer than three forms are given, the default is to use the first (masculine) form. * These details can be overridden in subclasses. * - * @param $gender string - * @param $forms array + * @param string $gender + * @param array $forms * * @return string */ @@ -3633,8 +3632,8 @@ class Language { * * Example: {{plural:{{NUMBEROFARTICLES}}|article|articles}} * - * @param $count Integer: non-localized number - * @param $forms Array: different plural forms + * @param int $count Non-localized number + * @param array $forms Different plural forms * @return string Correct form of plural for $count in this language */ function convertPlural( $count, $forms ) { @@ -3684,8 +3683,8 @@ class Language { * Checks that convertPlural was given an array and pads it to requested * amount of forms by copying the last one. * - * @param $count Integer: How many forms should there be at least - * @param $forms Array of forms given to convertPlural + * @param int $count How many forms should there be at least + * @param array $forms Array of forms given to convertPlural * @return array Padded array of forms or an exception if not an array */ protected function preConvertPlural( /* Array */ $forms, $count ) { @@ -3702,7 +3701,7 @@ class Language { * on old expiry lengths recorded in log entries. You'd need to provide the start date to * match up with it. * - * @param $str String: the validated block duration in English + * @param string $str The validated block duration in English * @return string Somehow translated block duration * @see LanguageFi.php for example implementation */ @@ -3747,8 +3746,8 @@ class Language { * languages like Chinese need to be segmented in order for the diff * to be of any use * - * @param $text String - * @return String + * @param string $text + * @return string */ public function segmentForDiff( $text ) { return $text; @@ -3757,8 +3756,8 @@ class Language { /** * and unsegment to show the result * - * @param $text String - * @return String + * @param string $text + * @return string */ public function unsegmentForDiff( $text ) { return $text; @@ -3777,7 +3776,7 @@ class Language { /** * convert text to all supported variants * - * @param $text string + * @param string $text * @return array */ public function autoConvertToAllVariants( $text ) { @@ -3787,7 +3786,7 @@ class Language { /** * convert text to different variants of a language. * - * @param $text string + * @param string $text * @return string */ public function convert( $text ) { @@ -3797,7 +3796,7 @@ class Language { /** * Convert a Title object to a string in the preferred variant * - * @param $title Title + * @param Title $title * @return string */ public function convertTitle( $title ) { @@ -3807,7 +3806,7 @@ class Language { /** * Convert a namespace index to a string in the preferred variant * - * @param $ns int + * @param int $ns * @return string */ public function convertNamespace( $ns ) { @@ -3827,7 +3826,7 @@ class Language { * Check if the language has the specific variant * * @since 1.19 - * @param $variant string + * @param string $variant * @return bool */ public function hasVariant( $variant ) { @@ -3837,7 +3836,7 @@ class Language { /** * Put custom tags (e.g. -{ }-) around math to prevent conversion * - * @param $text string + * @param string $text * @return string * @deprecated since 1.22 is no longer used */ @@ -3847,8 +3846,8 @@ class Language { /** * Perform output conversion on a string, and encode for safe HTML output. - * @param $text String text to be converted - * @param $isTitle Bool whether this conversion is for the article title + * @param string $text Text to be converted + * @param bool $isTitle Whether this conversion is for the article title * @return string * @todo this should get integrated somewhere sane */ @@ -3857,7 +3856,7 @@ class Language { } /** - * @param $key string + * @param string $key * @return string */ public function convertCategoryKey( $key ) { @@ -3901,10 +3900,10 @@ class Language { * actually exists in another variant. this function * tries to find it. See e.g. LanguageZh.php * - * @param $link String: the name of the link - * @param $nt Mixed: the title object of the link - * @param $ignoreOtherCond Boolean: to disable other conditions when - * we need to transclude a template or update a category's link + * @param string $link The name of the link + * @param Title $nt The title object of the link + * @param bool $ignoreOtherCond To disable other conditions when + * we need to transclude a template or update a category's link * @return null the input parameters may be modified upon return */ public function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { @@ -3940,9 +3939,9 @@ class Language { * This function is called "markNoConversion" for historical * reasons. * - * @param $text String: text to be used for external link - * @param $noParse bool: wrap it without confirming it's a real URL first - * @return string the tagged text + * @param string $text Text to be used for external link + * @param bool $noParse Wrap it without confirming it's a real URL first + * @return string The tagged text */ public function markNoConversion( $text, $noParse = false ) { // Excluding protocal-relative URLs may avoid many false positives. @@ -4038,7 +4037,7 @@ class Language { } /** - * @param $code string + * @param string $code */ public function setCode( $code ) { $this->mCode = $code; @@ -4049,9 +4048,9 @@ class Language { /** * Get the name of a file for a certain language code - * @param $prefix string Prepend this to the filename - * @param $code string Language code - * @param $suffix string Append this to the filename + * @param string $prefix Prepend this to the filename + * @param string $code Language code + * @param string $suffix Append this to the filename * @throws MWException * @return string $prefix . $mangledCode . $suffix */ @@ -4065,9 +4064,9 @@ class Language { /** * Get the language code from a file name. Inverse of getFileName() - * @param $filename string $prefix . $languageCode . $suffix - * @param $prefix string Prefix before the language code - * @param $suffix string Suffix after the language code + * @param string $filename $prefix . $languageCode . $suffix + * @param string $prefix Prefix before the language code + * @param string $suffix Suffix after the language code * @return string Language code, or false if $prefix or $suffix isn't found */ public static function getCodeFromFileName( $filename, $prefix = 'Language', $suffix = '.php' ) { @@ -4081,7 +4080,7 @@ class Language { } /** - * @param $code string + * @param string $code * @return string */ public static function getMessagesFileName( $code ) { @@ -4092,7 +4091,7 @@ class Language { } /** - * @param $code string + * @param string $code * @return string * @since 1.23 */ @@ -4107,7 +4106,7 @@ class Language { } /** - * @param $code string + * @param string $code * @return string */ public static function getClassFileName( $code ) { @@ -4118,7 +4117,7 @@ class Language { /** * Get the first fallback for a given language. * - * @param $code string + * @param string $code * * @return bool|string */ @@ -4136,7 +4135,7 @@ class Language { * Get the ordered list of fallback languages. * * @since 1.19 - * @param $code string Language code + * @param string $code Language code * @return array */ public static function getFallbacksFor( $code ) { @@ -4187,7 +4186,7 @@ class Language { * WARNING: this may take a long time. If you just need all message *keys* * but need the *contents* of only a few messages, consider using getMessageKeysFor(). * - * @param $code string + * @param string $code * * @return array */ @@ -4198,8 +4197,8 @@ class Language { /** * Get a message for a given language * - * @param $key string - * @param $code string + * @param string $key + * @param string $code * * @return string */ @@ -4212,7 +4211,7 @@ class Language { * array_keys( Language::getMessagesFor( $code ) ) * * @since 1.19 - * @param $code string Language code + * @param string $code Language code * @return array of message keys (strings) */ public static function getMessageKeysFor( $code ) { @@ -4220,7 +4219,7 @@ class Language { } /** - * @param $talk + * @param string $talk * @return mixed */ function fixVariableInNamespace( $talk ) { @@ -4241,7 +4240,7 @@ class Language { } /** - * @param $m string + * @param string $m * @return string */ function replaceGrammarInNamespace( $m ) { @@ -4275,10 +4274,10 @@ class Language { * * @todo FIXME: why are we returnings DBMS-dependent strings??? * - * @param $expiry String: Database expiry String - * @param $format Bool|Int true to process using language functions, or TS_ constant + * @param string $expiry Database expiry String + * @param bool|int $format True to process using language functions, or TS_ constant * to return the expiry in a given timestamp - * @return String + * @return string * @since 1.18 */ public function formatExpiry( $expiry, $format = true ) { @@ -4300,8 +4299,8 @@ class Language { /** * @todo Document - * @param $seconds int|float - * @param $format Array Optional + * @param int|float $seconds + * @param array $format Optional * If $format['avoid'] == 'avoidseconds' - don't mention seconds if $seconds >= 1 hour * If $format['avoid'] == 'avoidminutes' - don't mention seconds/minutes if $seconds > 48 hours * If $format['noabbrevs'] is true - use 'seconds' and friends instead of 'seconds-abbrev' and friends @@ -4404,7 +4403,7 @@ class Language { * This use base 1000. For base 1024 use formatSize(), for another base * see formatComputingNumbers() * - * @param $bps int + * @param int $bps * @return string */ function formatBitrate( $bps ) { @@ -4412,9 +4411,9 @@ class Language { } /** - * @param $size int Size of the unit - * @param $boundary int Size boundary (1000, or 1024 in most cases) - * @param $messageKey string Message key to be uesd + * @param int $size Size of the unit + * @param int $boundary Size boundary (1000, or 1024 in most cases) + * @param string $messageKey Message key to be uesd * @return string */ function formatComputingNumbers( $size, $boundary, $messageKey ) { @@ -4452,7 +4451,7 @@ class Language { * This method use base 1024. For base 1000 use formatBitrate(), for * another base see formatComputingNumbers() * - * @param $size int Size to format + * @param int $size Size to format * @return string Plain text (not HTML) */ function formatSize( $size ) { @@ -4462,11 +4461,11 @@ class Language { /** * Make a list item, used by various special pages * - * @param $page String Page link - * @param $details String Text between brackets - * @param $oppositedm Boolean Add the direction mark opposite to your - * language, to display text properly - * @return String + * @param string $page Page link + * @param string $details Text between brackets + * @param bool $oppositedm Add the direction mark opposite to your + * language, to display text properly + * @return string */ function specialList( $page, $details, $oppositedm = true ) { $dirmark = ( $oppositedm ? $this->getDirMark( true ) : '' ) . @@ -4479,12 +4478,12 @@ class Language { /** * Generate (prev x| next x) (20|50|100...) type links for paging * - * @param $title Title object to link - * @param $offset Integer offset parameter - * @param $limit Integer limit parameter - * @param $query array|String optional URL query parameter string - * @param $atend Bool optional param for specified if this is the last page - * @return String + * @param Title $title Title object to link + * @param int $offset + * @param int $limit + * @param array|string $query Optional URL query parameter string + * @param bool $atend Optional param for specified if this is the last page + * @return string */ public function viewPrevNext( Title $title, $offset, $limit, array $query = array(), $atend = false ) { // @todo FIXME: Why on earth this needs one message for the text and another one for tooltip? @@ -4521,14 +4520,14 @@ class Language { /** * Helper function for viewPrevNext() that generates links * - * @param $title Title object to link - * @param $offset Integer offset parameter - * @param $limit Integer limit parameter - * @param $query Array extra query parameters - * @param $link String text to use for the link; will be escaped - * @param $tooltipMsg String name of the message to use as tooltip - * @param $class String value of the "class" attribute of the link - * @return String HTML fragment + * @param Title $title Title object to link + * @param int $offset + * @param int $limit + * @param array $query Extra query parameters + * @param string $link Text to use for the link; will be escaped + * @param string $tooltipMsg Name of the message to use as tooltip + * @param string $class Value of the "class" attribute of the link + * @return string HTML fragment */ private function numLink( Title $title, $offset, $limit, array $query, $link, $tooltipMsg, $class ) { $query = array( 'limit' => $limit, 'offset' => $offset ) + $query; diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 8451401100..92cf68c062 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -330,9 +330,9 @@ class LanguageConverter { * If you want to parse rules, try to use convert() or * convertTo(). * - * @param $text String the text to be converted - * @param $toVariant bool|string the target language code - * @return String the converted text + * @param string $text The text to be converted + * @param bool|string $toVariant The target language code + * @return string The converted text */ public function autoConvert( $text, $toVariant = false ) { wfProfileIn( __METHOD__ ); @@ -492,7 +492,7 @@ class LanguageConverter { /** * Apply manual conversion rules. * - * @param $convRule ConverterRule Object of ConverterRule + * @param ConverterRule $convRule */ protected function applyManualConv( $convRule ) { // Use syntax -{T|zh-cn:TitleCN; zh-tw:TitleTw}- to custom @@ -815,9 +815,9 @@ class LanguageConverter { /** * Guess if a text is written in a variant. This should be implemented in subclasses. * - * @param string $text the text to be checked - * @param string $variant language code of the variant to be checked for - * @return bool true if $text appears to be written in $variant, false if not + * @param string $text The text to be checked + * @param string $variant Language code of the variant to be checked for + * @return bool True if $text appears to be written in $variant, false if not * * @author Nikola Smolenski * @since 1.19 @@ -1036,7 +1036,7 @@ class LanguageConverter { * Convert the sorting key for category links. This should make different * keys that are variants of each other map to the same key. * - * @param $key string + * @param string $key * * @return string */ @@ -1051,14 +1051,14 @@ class LanguageConverter { * * @param WikiPage $page * @param User $user User object for the current user - * @param Content $content new page content - * @param string $summary edit summary of the edit - * @param bool $isMinor was the edit marked as minor? - * @param bool $isWatch did the user watch this page or not? + * @param Content $content New page content + * @param string $summary Edit summary of the edit + * @param bool $isMinor Was the edit marked as minor? + * @param bool $isWatch Did the user watch this page or not? * @param string|int $section * @param int $flags Bitfield - * @param Revision $revision new Revision object or null - * @return bool true + * @param Revision|null $revision New Revision object or null + * @return bool True */ function OnPageContentSaveComplete( $page, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $revision ) { diff --git a/languages/classes/LanguageAr.php b/languages/classes/LanguageAr.php index 553ff077cd..858a7be880 100644 --- a/languages/classes/LanguageAr.php +++ b/languages/classes/LanguageAr.php @@ -36,7 +36,7 @@ class LanguageAr extends Language { * @todo FIXME: This is language-specific for now only to avoid the negative * performance impact of enabling it for all languages. * - * @param $s string + * @param string $s * * @return string */ diff --git a/languages/classes/LanguageAz.php b/languages/classes/LanguageAz.php index 48f70e8521..2199467ddf 100644 --- a/languages/classes/LanguageAz.php +++ b/languages/classes/LanguageAz.php @@ -29,7 +29,7 @@ class LanguageAz extends Language { /** - * @param $string string + * @param string $string * @return mixed|string */ function ucfirst( $string ) { diff --git a/languages/classes/LanguageBe_tarask.php b/languages/classes/LanguageBe_tarask.php index 05b9550f77..cf93d2d73f 100644 --- a/languages/classes/LanguageBe_tarask.php +++ b/languages/classes/LanguageBe_tarask.php @@ -37,7 +37,7 @@ class LanguageBe_tarask extends Language { * This function unifies apostrophe sign in search index values * to enable seach using both apostrophe signs. * - * @param $string string + * @param string $string * * @return string */ @@ -60,7 +60,7 @@ class LanguageBe_tarask extends Language { * Four-digit number should be without group commas (spaces) * So "1 234 567", "12 345" but "1234" * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageBg.php b/languages/classes/LanguageBg.php index d735c7a028..a592d025b4 100644 --- a/languages/classes/LanguageBg.php +++ b/languages/classes/LanguageBg.php @@ -31,7 +31,7 @@ class LanguageBg extends Language { * ISO number formatting: 123 456 789,99. * Avoid tripple grouping by numbers with whole part up to 4 digits. * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageBs.php b/languages/classes/LanguageBs.php index 072e857ba6..584f3045bb 100644 --- a/languages/classes/LanguageBs.php +++ b/languages/classes/LanguageBs.php @@ -34,8 +34,8 @@ class LanguageBs extends Language { * * Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * * @return string */ diff --git a/languages/classes/LanguageCu.php b/languages/classes/LanguageCu.php index 60cf2b1a9a..abe70e38d8 100644 --- a/languages/classes/LanguageCu.php +++ b/languages/classes/LanguageCu.php @@ -32,8 +32,8 @@ class LanguageCu extends Language { * Convert from the nominative form of a noun to some other case * Invoked with {{grammar:case|word}} * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { diff --git a/languages/classes/LanguageDsb.php b/languages/classes/LanguageDsb.php index 0ae0524277..21ff4280af 100644 --- a/languages/classes/LanguageDsb.php +++ b/languages/classes/LanguageDsb.php @@ -33,8 +33,8 @@ class LanguageDsb extends Language { * Convert from the nominative form of a noun to some other case * Invoked with {{grammar:case|word}} * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { diff --git a/languages/classes/LanguageEo.php b/languages/classes/LanguageEo.php index 0e2d8b4acf..15fc8c037f 100644 --- a/languages/classes/LanguageEo.php +++ b/languages/classes/LanguageEo.php @@ -54,9 +54,9 @@ class LanguageEo extends Language { * editor behavior; the original server-side translation system dates to 2002-2003 * when many browsers with really bad Unicode support were still in use. * - * @param string $in input character set - * @param string $out output character set - * @param string $string text to be converted + * @param string $in Input character set + * @param string $out Output character set + * @param string $string Text to be converted * @return string */ function iconv( $in, $out, $string ) { @@ -74,7 +74,7 @@ class LanguageEo extends Language { } /** - * @param $matches array + * @param array $matches * @return string */ function strrtuxCallback( $matches ) { @@ -91,7 +91,7 @@ class LanguageEo extends Language { } /** - * @param $matches array + * @param array $matches * @return string */ function strrtxuCallback( $matches ) { diff --git a/languages/classes/LanguageEs.php b/languages/classes/LanguageEs.php index f55c2e4300..098148f731 100644 --- a/languages/classes/LanguageEs.php +++ b/languages/classes/LanguageEs.php @@ -29,7 +29,7 @@ class LanguageEs extends Language { /** - * @param $_ string + * @param string $_ * @return string */ function commafy( $_ ) { diff --git a/languages/classes/LanguageEt.php b/languages/classes/LanguageEt.php index 1a9f286fa3..6425a53397 100644 --- a/languages/classes/LanguageEt.php +++ b/languages/classes/LanguageEt.php @@ -30,7 +30,7 @@ class LanguageEt extends Language { /** * Avoid grouping whole numbers between 0 to 9999 * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageFi.php b/languages/classes/LanguageFi.php index ee1d1b52c4..910e8aeaf4 100644 --- a/languages/classes/LanguageFi.php +++ b/languages/classes/LanguageFi.php @@ -33,8 +33,8 @@ class LanguageFi extends Language { * Convert from the nominative form of a noun to some other case * Invoked with {{grammar:case|word}} * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { @@ -85,8 +85,8 @@ class LanguageFi extends Language { } /** - * @param $str string - * @param $forContent bool + * @param string $str + * @param bool $forContent * @return string */ function translateBlockExpiry( $str, $forContent = false ) { diff --git a/languages/classes/LanguageGa.php b/languages/classes/LanguageGa.php index 339ad4de4d..38c50d2eb2 100644 --- a/languages/classes/LanguageGa.php +++ b/languages/classes/LanguageGa.php @@ -32,8 +32,8 @@ class LanguageGa extends Language { * Convert day names * Invoked with {{GRAMMAR:transformation|word}} * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { diff --git a/languages/classes/LanguageGan.php b/languages/classes/LanguageGan.php index d81574d100..e298c0b910 100644 --- a/languages/classes/LanguageGan.php +++ b/languages/classes/LanguageGan.php @@ -30,12 +30,12 @@ require_once __DIR__ . '/LanguageZh.php'; class GanConverter extends LanguageConverter { /** - * @param $langobj Language - * @param $maincode string - * @param $variants array - * @param $variantfallbacks array - * @param $flags array - * @param $manualLevel array + * @param Language $langobj + * @param string $maincode + * @param array $variants + * @param array $variantfallbacks + * @param array $flags + * @param array $manualLevel */ function __construct( $langobj, $maincode, $variants = array(), @@ -67,8 +67,8 @@ class GanConverter extends LanguageConverter { } /** - * @param $key string - * @return String + * @param string $key + * @return string */ function convertCategoryKey( $key ) { return $this->autoConvert( $key, 'gan' ); @@ -108,9 +108,9 @@ class LanguageGan extends LanguageZh { /** * word segmentation * - * @param $string string - * @param $autoVariant string - * @return String + * @param string $string + * @param string $autoVariant + * @return string */ function normalizeForSearch( $string, $autoVariant = 'gan-hans' ) { // LanguageZh::normalizeForSearch diff --git a/languages/classes/LanguageHe.php b/languages/classes/LanguageHe.php index 0391988683..a6aaf6dbc9 100644 --- a/languages/classes/LanguageHe.php +++ b/languages/classes/LanguageHe.php @@ -35,8 +35,8 @@ class LanguageHe extends Language { * Available cases: * "prefixed" (or "תחילית") - when the word has a prefix * - * @param $word String: the word to convert - * @param $case String: the case + * @param string $word The word to convert + * @param string $case The case * * @return string */ diff --git a/languages/classes/LanguageHsb.php b/languages/classes/LanguageHsb.php index 1fc1404472..acf0122b69 100644 --- a/languages/classes/LanguageHsb.php +++ b/languages/classes/LanguageHsb.php @@ -32,8 +32,8 @@ class LanguageHsb extends Language { * Convert from the nominative form of a noun to some other case * Invoked with {{grammar:case|word}} * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { diff --git a/languages/classes/LanguageHu.php b/languages/classes/LanguageHu.php index 1f4d45c033..bbf3b0557a 100644 --- a/languages/classes/LanguageHu.php +++ b/languages/classes/LanguageHu.php @@ -29,8 +29,8 @@ class LanguageHu extends Language { /** - * @param $word string - * @param $case + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { diff --git a/languages/classes/LanguageHy.php b/languages/classes/LanguageHy.php index 240682962d..b7767eb3a6 100644 --- a/languages/classes/LanguageHy.php +++ b/languages/classes/LanguageHy.php @@ -33,8 +33,8 @@ class LanguageHy extends Language { * Convert from the nominative form of a noun to some other case * Invoked with {{grammar:case|word}} * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { @@ -82,7 +82,7 @@ class LanguageHy extends Language { /** * Armenian numeric format is "12 345,67" but "1234,56" * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageIu.php b/languages/classes/LanguageIu.php index a46eafb43f..28b1ce1328 100644 --- a/languages/classes/LanguageIu.php +++ b/languages/classes/LanguageIu.php @@ -102,8 +102,8 @@ class IuConverter extends LanguageConverter { * update: delete all rule parsing because it's not used * currently, and just produces a couple of bugs * - * @param $rule string - * @param $flags array + * @param string $rule + * @param array $flags * @return array */ function parseManualRule( $rule, $flags = array() ) { @@ -123,8 +123,8 @@ class IuConverter extends LanguageConverter { /** * Do not convert content on talk pages * - * @param $text string - * @param $parser Parser + * @param string $text + * @param Parser $parser * @return string */ function parserConvert( $text, &$parser ) { @@ -139,9 +139,9 @@ class IuConverter extends LanguageConverter { * names as they were * - do not try to find variants for usernames * - * @param $link string - * @param $nt Title - * @param $ignoreOtherCond bool + * @param string $link + * @param Title $nt + * @param bool $ignoreOtherCond */ function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { // check for user namespace @@ -163,8 +163,8 @@ class IuConverter extends LanguageConverter { * An ugly function wrapper for parsing Image titles * (to prevent image name conversion) * - * @param $text string - * @param $toVariant bool + * @param string $text + * @param bool $toVariant * * @return string */ @@ -182,8 +182,8 @@ class IuConverter extends LanguageConverter { /** * It translates text into variant * - * @param $text string - * @param $toVariant bool + * @param string $text + * @param bool $toVariant * * @return string */ diff --git a/languages/classes/LanguageJa.php b/languages/classes/LanguageJa.php index 9c6314c557..043b155428 100644 --- a/languages/classes/LanguageJa.php +++ b/languages/classes/LanguageJa.php @@ -29,7 +29,7 @@ class LanguageJa extends Language { /** - * @param $string string + * @param string $string * @return string */ function segmentByWord( $string ) { @@ -53,7 +53,7 @@ class LanguageJa extends Language { * Italic is not appropriate for Japanese script * Unfortunately most browsers do not recognise this, and render as italic * - * @param $text string + * @param string $text * @return string */ function emphasize( $text ) { diff --git a/languages/classes/LanguageKaa.php b/languages/classes/LanguageKaa.php index 6203b4ba5e..eab08fe362 100644 --- a/languages/classes/LanguageKaa.php +++ b/languages/classes/LanguageKaa.php @@ -33,8 +33,8 @@ class LanguageKaa extends Language { /** * Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * * @return string */ @@ -50,7 +50,7 @@ class LanguageKaa extends Language { /** * It fixes issue with ucfirst for transforming 'i' to 'İ' * - * @param $string string + * @param string $string * * @return string */ @@ -65,7 +65,7 @@ class LanguageKaa extends Language { /** * It fixes issue with lcfirst for transforming 'I' to 'ı' * - * @param $string string + * @param string $string * * @return mixed|string */ @@ -80,7 +80,7 @@ class LanguageKaa extends Language { /** * Avoid grouping whole numbers between 0 to 9999 * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageKk.php b/languages/classes/LanguageKk.php index f96b0d92a4..a7b1668c64 100644 --- a/languages/classes/LanguageKk.php +++ b/languages/classes/LanguageKk.php @@ -42,11 +42,11 @@ class KkConverter extends LanguageConverter { protected $mCyrl2Latn, $mLatn2Cyrl, $mCyLa2Arab; /** - * @param $langobj Language - * @param $maincode string - * @param $variants array - * @param $variantfallbacks array - * @param $flags array + * @param Language $langobj + * @param string $maincode + * @param array $variants + * @param array $variantfallbacks + * @param array $flags */ function __construct( $langobj, $maincode, $variants = array(), @@ -227,8 +227,8 @@ class KkConverter extends LanguageConverter { * update: delete all rule parsing because it's not used * currently, and just produces a couple of bugs * - * @param $rule string - * @param $flags array + * @param string $rule + * @param array $flags * @return array */ function parseManualRule( $rule, $flags = array() ) { @@ -251,8 +251,8 @@ class KkConverter extends LanguageConverter { * names as they were * - do not try to find variants for usernames * - * @param $link string - * @param $nt Title + * @param string $link + * @param Title $nt * @param bool $ignoreOtherCond */ function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { @@ -275,8 +275,8 @@ class KkConverter extends LanguageConverter { * An ugly function wrapper for parsing Image titles * (to prevent image name conversion) * - * @param $text string - * @param $toVariant bool + * @param string $text + * @param bool $toVariant * * @return string */ @@ -294,8 +294,8 @@ class KkConverter extends LanguageConverter { /** * It translates text into variant * - * @param $text string - * @param $toVariant string + * @param string $text + * @param string $toVariant * * @return string */ @@ -338,8 +338,8 @@ class KkConverter extends LanguageConverter { } /** - * @param $text string - * @param $toVariant string + * @param string $text + * @param string $toVariant * @return mixed|string */ function regsConverter( $text, $toVariant ) { @@ -395,8 +395,8 @@ class KkConverter extends LanguageConverter { } /** - * @param $key string - * @return String + * @param string $key + * @return string */ function convertCategoryKey( $key ) { return $this->autoConvert( $key, 'kk' ); @@ -435,7 +435,7 @@ class LanguageKk extends LanguageKk_cyrl { /** * It fixes issue with ucfirst for transforming 'i' to 'İ' * - * @param $string string + * @param string $string * * @return string */ @@ -452,7 +452,7 @@ class LanguageKk extends LanguageKk_cyrl { /** * It fixes issue with lcfirst for transforming 'I' to 'ı' * - * @param $string string + * @param string $string * * @return string */ @@ -467,8 +467,8 @@ class LanguageKk extends LanguageKk_cyrl { } /** - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { diff --git a/languages/classes/LanguageKk_cyrl.php b/languages/classes/LanguageKk_cyrl.php index 4e086139e3..1541ab4814 100644 --- a/languages/classes/LanguageKk_cyrl.php +++ b/languages/classes/LanguageKk_cyrl.php @@ -33,8 +33,8 @@ class LanguageKk_cyrl extends Language { /** * Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * * @return string */ @@ -259,8 +259,8 @@ class LanguageKk_cyrl extends Language { } /** - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammarKk_latn( $word, $case ) { @@ -484,8 +484,8 @@ class LanguageKk_cyrl extends Language { } /** - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammarKk_arab( $word, $case ) { @@ -709,8 +709,8 @@ class LanguageKk_cyrl extends Language { } /** - * @param $word string - * @param $allVowels array + * @param string $word + * @param array $allVowels * @return array */ function lastLetter( $word, $allVowels ) { @@ -750,7 +750,7 @@ class LanguageKk_cyrl extends Language { /** * Avoid grouping whole numbers between 0 to 9999 * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageKm.php b/languages/classes/LanguageKm.php index 71d67a7636..1e0bb004da 100644 --- a/languages/classes/LanguageKm.php +++ b/languages/classes/LanguageKm.php @@ -30,7 +30,7 @@ class LanguageKm extends Language { /** - * @param $_ string + * @param string $_ * @return string */ function commafy( $_ ) { diff --git a/languages/classes/LanguageKsh.php b/languages/classes/LanguageKsh.php index d25ce7147b..9a055c2173 100644 --- a/languages/classes/LanguageKsh.php +++ b/languages/classes/LanguageKsh.php @@ -83,8 +83,8 @@ class LanguageKsh extends Language { * Contents of the leftmost table column can be copied and pasted as * "case" values. * - * @param $word String - * @param $case String + * @param string $word + * @param string $case * * @return string */ @@ -168,7 +168,7 @@ class LanguageKsh extends Language { /** * Avoid grouping whole numbers between 0 to 9999 * - * @param $_ string + * @param string $_ * * @return string */ @@ -183,8 +183,8 @@ class LanguageKsh extends Language { /** * Handle cases of (1, other, 0) or (1, other) * - * @param $count int - * @param $forms array + * @param int $count + * @param array $forms * * @return string */ diff --git a/languages/classes/LanguageKu.php b/languages/classes/LanguageKu.php index 75ac1c77e3..1c867d92f7 100644 --- a/languages/classes/LanguageKu.php +++ b/languages/classes/LanguageKu.php @@ -159,9 +159,9 @@ class KuConverter extends LanguageConverter { * names as they were * - do not try to find variants for usernames * - * @param $link string - * @param $nt Title - * @param $ignoreOtherCond bool + * @param string $link + * @param Title $nt + * @param bool $ignoreOtherCond */ function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { // check for user namespace @@ -183,8 +183,8 @@ class KuConverter extends LanguageConverter { * An ugly function wrapper for parsing Image titles * (to prevent image name conversion) * - * @param $text string - * @param $toVariant bool + * @param string $text + * @param bool $toVariant * * @return string */ @@ -203,8 +203,8 @@ class KuConverter extends LanguageConverter { * It translates text into variant, specials: * - ommiting roman numbers * - * @param $text string - * @param $toVariant bool + * @param string $text + * @param bool $toVariant * * @throws MWException * @return string diff --git a/languages/classes/LanguageKu_ku.php b/languages/classes/LanguageKu_ku.php index 2381de53e8..65fa57690b 100644 --- a/languages/classes/LanguageKu_ku.php +++ b/languages/classes/LanguageKu_ku.php @@ -31,7 +31,7 @@ class LanguageKu_ku extends Language { /** * Avoid grouping whole numbers between 0 to 9999 * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageLa.php b/languages/classes/LanguageLa.php index 9c778782ca..e2dea1d986 100644 --- a/languages/classes/LanguageLa.php +++ b/languages/classes/LanguageLa.php @@ -35,8 +35,8 @@ class LanguageLa extends Language { * * Cases: genitive, accusative, ablative * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * * @return string */ diff --git a/languages/classes/LanguageMl.php b/languages/classes/LanguageMl.php index ec3ea54126..cd39378b14 100644 --- a/languages/classes/LanguageMl.php +++ b/languages/classes/LanguageMl.php @@ -37,7 +37,7 @@ class LanguageMl extends Language { * @todo FIXME: This is language-specific for now only to avoid the negative * performance impact of enabling it for all languages. * - * @param $s string + * @param string $s * * @return string */ diff --git a/languages/classes/LanguageMy.php b/languages/classes/LanguageMy.php index 1d117dd604..236ae4f5b0 100644 --- a/languages/classes/LanguageMy.php +++ b/languages/classes/LanguageMy.php @@ -30,7 +30,7 @@ class LanguageMy extends Language { /** - * @param $_ string + * @param string $_ * @return string */ function commafy( $_ ) { diff --git a/languages/classes/LanguageOs.php b/languages/classes/LanguageOs.php index 7ea67f2573..dbf4cceb32 100644 --- a/languages/classes/LanguageOs.php +++ b/languages/classes/LanguageOs.php @@ -49,8 +49,8 @@ class LanguageOs extends Language { * Then result word is: word + 'й' + case ending for cases != allative or comitative * and word + case ending for allative or comitative. Ending of allative case here is 'æ'. * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { diff --git a/languages/classes/LanguagePl.php b/languages/classes/LanguagePl.php index 8e286c9430..e0bf06905e 100644 --- a/languages/classes/LanguagePl.php +++ b/languages/classes/LanguagePl.php @@ -28,7 +28,7 @@ */ class LanguagePl extends Language { /** - * @param $_ string + * @param string $_ * @return string */ function commafy( $_ ) { diff --git a/languages/classes/LanguageQqx.php b/languages/classes/LanguageQqx.php index 9d92834df4..1ee398deb1 100644 --- a/languages/classes/LanguageQqx.php +++ b/languages/classes/LanguageQqx.php @@ -32,7 +32,7 @@ */ class LanguageQqx extends Language { /** - * @param $key string + * @param string $key * @return string */ function getMessage( $key ) { diff --git a/languages/classes/LanguageRu.php b/languages/classes/LanguageRu.php index d3ac1d222c..740663ffef 100644 --- a/languages/classes/LanguageRu.php +++ b/languages/classes/LanguageRu.php @@ -34,8 +34,8 @@ class LanguageRu extends Language { * Convert from the nominative form of a noun to some other case * Invoked with {{grammar:case|word}} * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { @@ -108,7 +108,7 @@ class LanguageRu extends Language { * See manual of style at http://ru.wikipedia.org/wiki/Википедия:Оформление_статей * So "1 234 567", "12 345" but "1234" * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageShi.php b/languages/classes/LanguageShi.php index f4180cb8fb..4e03c25219 100644 --- a/languages/classes/LanguageShi.php +++ b/languages/classes/LanguageShi.php @@ -81,8 +81,8 @@ class ShiConverter extends LanguageConverter { * update: delete all rule parsing because it's not used * currently, and just produces a couple of bugs * - * @param $rule string - * @param $flags array + * @param string $rule + * @param array $flags * @return array */ function parseManualRule( $rule, $flags = array() ) { @@ -102,8 +102,8 @@ class ShiConverter extends LanguageConverter { /** * Do not convert content on talk pages * - * @param $text string - * @param $parser Parser + * @param string $text + * @param Parser $parser * @return string */ function parserConvert( $text, &$parser ) { @@ -118,9 +118,9 @@ class ShiConverter extends LanguageConverter { * names as they were * - do not try to find variants for usernames * - * @param $link string - * @param $nt Title - * @param $ignoreOtherCond bool + * @param string $link + * @param Title $nt + * @param bool $ignoreOtherCond */ function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { // check for user namespace @@ -142,8 +142,8 @@ class ShiConverter extends LanguageConverter { * An ugly function wrapper for parsing Image titles * (to prevent image name conversion) * - * @param $text string - * @param $toVariant bool + * @param string $text + * @param bool $toVariant * * @return string */ @@ -161,8 +161,8 @@ class ShiConverter extends LanguageConverter { /** * It translates text into variant * - * @param $text string - * @param $toVariant string + * @param string $text + * @param string $toVariant * * @return string */ diff --git a/languages/classes/LanguageSl.php b/languages/classes/LanguageSl.php index 06c75c955c..36296a08d6 100644 --- a/languages/classes/LanguageSl.php +++ b/languages/classes/LanguageSl.php @@ -32,8 +32,8 @@ class LanguageSl extends Language { /** * Cases: rodilnik, dajalnik, tožilnik, mestnik, orodnik * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * * @return string */ diff --git a/languages/classes/LanguageSr.php b/languages/classes/LanguageSr.php index 06cb1b5610..d0c4e06f10 100644 --- a/languages/classes/LanguageSr.php +++ b/languages/classes/LanguageSr.php @@ -84,8 +84,8 @@ class SrConverter extends LanguageConverter { * update: delete all rule parsing because it's not used * currently, and just produces a couple of bugs * - * @param $rule string - * @param $flags array + * @param string $rule + * @param array $flags * @return array */ function parseManualRule( $rule, $flags = array() ) { @@ -108,9 +108,9 @@ class SrConverter extends LanguageConverter { * names as they were * - do not try to find variants for usernames * - * @param $link string - * @param $nt Title - * @param $ignoreOtherCond bool + * @param string $link + * @param Title $nt + * @param bool $ignoreOtherCond */ function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) { // check for user namespace @@ -132,8 +132,8 @@ class SrConverter extends LanguageConverter { * An ugly function wrapper for parsing Image titles * (to prevent image name conversion) * - * @param $text string - * @param $toVariant bool + * @param string $text + * @param bool $toVariant * * @return string */ @@ -152,8 +152,8 @@ class SrConverter extends LanguageConverter { * It translates text into variant, specials: * - ommiting roman numbers * - * @param $text string - * @param $toVariant string + * @param string $text + * @param string $toVariant * * @throws MWException * @return string @@ -192,7 +192,7 @@ class SrConverter extends LanguageConverter { * * @param string $text The text to be checked * @param string $variant Language code of the variant to be checked for - * @return bool true if $text appears to be written in $variant + * @return bool True if $text appears to be written in $variant * * @author Nikola Smolenski * @since 1.19 diff --git a/languages/classes/LanguageTr.php b/languages/classes/LanguageTr.php index 8d2fe16646..8431c3ffcd 100644 --- a/languages/classes/LanguageTr.php +++ b/languages/classes/LanguageTr.php @@ -34,7 +34,7 @@ class LanguageTr extends Language { /** - * @param $string string + * @param string $string * @return string */ function ucfirst( $string ) { @@ -46,7 +46,7 @@ class LanguageTr extends Language { } /** - * @param $string string + * @param string $string * @return mixed|string */ function lcfirst( $string ) { diff --git a/languages/classes/LanguageTyv.php b/languages/classes/LanguageTyv.php index f3623299db..10aab4310c 100644 --- a/languages/classes/LanguageTyv.php +++ b/languages/classes/LanguageTyv.php @@ -33,8 +33,8 @@ class LanguageTyv extends Language { * Grammatical transformations, needed for inflected languages * Invoked by putting {{grammar:case|word}} in a message * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { diff --git a/languages/classes/LanguageUk.php b/languages/classes/LanguageUk.php index 08041a928e..4e5d85ac15 100644 --- a/languages/classes/LanguageUk.php +++ b/languages/classes/LanguageUk.php @@ -32,8 +32,8 @@ class LanguageUk extends Language { * Convert from the nominative form of a noun to some other case * Invoked with {{grammar:case|word}} * - * @param $word string - * @param $case string + * @param string $word + * @param string $case * @return string */ function convertGrammar( $word, $case ) { @@ -89,7 +89,7 @@ class LanguageUk extends Language { /** * Ukrainian numeric format is "12 345,67" but "1234,56" * - * @param $_ string + * @param string $_ * * @return string */ diff --git a/languages/classes/LanguageWa.php b/languages/classes/LanguageWa.php index e5f7438fda..98d138dbf1 100644 --- a/languages/classes/LanguageWa.php +++ b/languages/classes/LanguageWa.php @@ -36,10 +36,10 @@ class LanguageWa extends Language { * " di " for months starting by a consoun, and * " d' " for months starting with a vowel * - * @param $ts string - * @param $adj bool - * @param $format bool - * @param $tc bool + * @param string $ts + * @param bool $adj + * @param bool $format + * @param bool $tc * @return string */ function date( $ts, $adj = false, $format = true, $tc = false ) { @@ -85,10 +85,10 @@ class LanguageWa extends Language { } /** - * @param $ts string - * @param $adj bool - * @param $format bool - * @param $tc bool + * @param string $ts + * @param bool $adj + * @param bool $format + * @param bool $tc * @return string */ function timeanddate( $ts, $adj = false, $format = true, $tc = false ) { diff --git a/languages/classes/LanguageYue.php b/languages/classes/LanguageYue.php index aef521519a..3293cc646f 100644 --- a/languages/classes/LanguageYue.php +++ b/languages/classes/LanguageYue.php @@ -40,7 +40,7 @@ class LanguageYue extends Language { * for now just treat each character as a word. * @todo FIXME: Only do this for Han characters... * - * @param $string string + * @param string $string * @return string */ function segmentByWord( $string ) { @@ -50,7 +50,7 @@ class LanguageYue extends Language { } /** - * @param $string + * @param string $string * @return string */ function normalizeForSearch( $string ) { diff --git a/languages/classes/LanguageZh.php b/languages/classes/LanguageZh.php index d4130183c5..0b77c56c4e 100644 --- a/languages/classes/LanguageZh.php +++ b/languages/classes/LanguageZh.php @@ -30,12 +30,12 @@ require_once __DIR__ . '/LanguageZh_hans.php'; class ZhConverter extends LanguageConverter { /** - * @param $langobj Language - * @param $maincode string - * @param $variants array - * @param $variantfallbacks array - * @param $flags array - * @param $manualLevel array + * @param Language $langobj + * @param string $maincode + * @param array $variants + * @param array $variantfallbacks + * @param array $flags + * @param array $manualLevel */ function __construct( $langobj, $maincode, $variants = array(), @@ -88,8 +88,8 @@ class ZhConverter extends LanguageConverter { } /** - * @param $key string - * @return String + * @param string $key + * @return string */ function convertCategoryKey( $key ) { return $this->autoConvert( $key, 'zh' ); @@ -138,7 +138,7 @@ class LanguageZh extends LanguageZh_hans { /** * this should give much better diff info * - * @param $text string + * @param string $text * @return string */ function segmentForDiff( $text ) { @@ -146,7 +146,7 @@ class LanguageZh extends LanguageZh_hans { } /** - * @param $text string + * @param string $text * @return string */ function unsegmentForDiff( $text ) { @@ -156,9 +156,9 @@ class LanguageZh extends LanguageZh_hans { /** * auto convert to zh-hans and normalize special characters. * - * @param $string String - * @param $autoVariant String, default to 'zh-hans' - * @return String + * @param string $string + * @param string $autoVariant default to 'zh-hans' + * @return string */ function normalizeForSearch( $string, $autoVariant = 'zh-hans' ) { wfProfileIn( __METHOD__ ); @@ -176,7 +176,7 @@ class LanguageZh extends LanguageZh_hans { } /** - * @param $termsArray array + * @param array $termsArray * @return array */ function convertForSearchResult( $termsArray ) { diff --git a/languages/classes/LanguageZh_hans.php b/languages/classes/LanguageZh_hans.php index 3851c8fed5..2f7c344e36 100644 --- a/languages/classes/LanguageZh_hans.php +++ b/languages/classes/LanguageZh_hans.php @@ -40,7 +40,7 @@ class LanguageZh_hans extends Language { * for now just treat each character as a word. * @todo FIXME: Only do this for Han characters... * - * @param $string string + * @param string $string * * @return string */ @@ -51,7 +51,7 @@ class LanguageZh_hans extends Language { } /** - * @param $s + * @param string $s * @return string */ function normalizeForSearch( $s ) { @@ -71,7 +71,7 @@ class LanguageZh_hans extends Language { * * @since 1.21 * - * @param integer $seconds The amount of seconds. + * @param int $seconds The amount of seconds. * @param array $chosenIntervals The intervals to enable. * * @return string -- 2.20.1