r89119 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89118‎ | r89119 | r89120 >
Date:16:32, 29 May 2011
Author:reedy
Status:ok
Tags:
Comment:
More documentation!
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageConverter.php
@@ -305,9 +305,9 @@
306306 * If you want to parse rules, try to use convert() or
307307 * convertTo().
308308 *
309 - * @param $text String: the text to be converted
310 - * @param $toVariant String: the target language code
311 - * @return String: the converted text
 309+ * @param $text String the text to be converted
 310+ * @param $toVariant bool|string the target language code
 311+ * @return String the converted text
312312 */
313313 public function autoConvert( $text, $toVariant = false ) {
314314 wfProfileIn( __METHOD__ );
@@ -481,7 +481,7 @@
482482 /**
483483 * Apply manual conversion rules.
484484 *
485 - * @param $convRule Object: Object of ConverterRule
 485+ * @param $convRule ConverterRule Object of ConverterRule
486486 */
487487 protected function applyManualConv( $convRule ) {
488488 // Use syntax -{T|zh-cn:TitleCN; zh-tw:TitleTw}- to custom
@@ -521,7 +521,7 @@
522522 * Auto convert a Title object to a readable string in the
523523 * preferred variant.
524524 *
525 - * @param $title Object: a object of Title
 525+ * @param $title Title a object of Title
526526 * @return String: converted title text
527527 */
528528 public function convertTitle( $title ) {
@@ -622,7 +622,9 @@
623623 *
624624 * @param $text String: text to be converted
625625 * @param $variant String: the target variant code
 626+ * @param $startPos int
626627 * @param $depth Integer: depth of recursion
 628+ *
627629 * @return String: converted text
628630 */
629631 protected function recursiveConvertRule( $text, $variant, &$startPos, $depth = 0 ) {
@@ -993,6 +995,10 @@
994996 /**
995997 * Convert the sorting key for category links. This should make different
996998 * keys that are variants of each other map to the same key.
 999+ *
 1000+ * @param $key string
 1001+ *
 1002+ * @return string
9971003 */
9981004 function convertCategoryKey( $key ) {
9991005 return $key;
@@ -1003,7 +1009,7 @@
10041010 * MediaWiki:Conversiontable* is updated.
10051011 * @private
10061012 *
1007 - * @param $article Object: Article object
 1013+ * @param $article Article object
10081014 * @param $user Object: User object for the current user
10091015 * @param $text String: article text (?)
10101016 * @param $summary String: edit summary of the edit
@@ -1260,6 +1266,8 @@
12611267 * Parse rules conversion.
12621268 * @private
12631269 *
 1270+ * @param $variant
 1271+ *
12641272 * @return string
12651273 */
12661274 function getRuleConvertedStr( $variant ) {
@@ -1486,6 +1494,7 @@
14871495
14881496 /**
14891497 * Return how deal with conversion rules.
 1498+ * @return string
14901499 */
14911500 public function getRulesAction() {
14921501 return $this->mRulesAction;
@@ -1494,6 +1503,7 @@
14951504 /**
14961505 * Get conversion table. (bidirectional and unidirectional
14971506 * conversion table)
 1507+ * @return array
14981508 */
14991509 public function getConvTable() {
15001510 return $this->mConvTable;
@@ -1501,6 +1511,7 @@
15021512
15031513 /**
15041514 * Get conversion rules string.
 1515+ * @return string
15051516 */
15061517 public function getRules() {
15071518 return $this->mRules;
@@ -1508,6 +1519,7 @@
15091520
15101521 /**
15111522 * Get conversion flags.
 1523+ * @return array
15121524 */
15131525 public function getFlags() {
15141526 return $this->mFlags;
Index: trunk/phase3/languages/Language.php
@@ -1721,7 +1721,7 @@
17221722 * @param $adj Bool: whether to adjust the time output according to the
17231723 * user configured offset ($timecorrection)
17241724 * @param $format Mixed: true to use user's date format preference
1725 - * @param $timecorrection String: the time offset as returned by
 1725+ * @param $timecorrection String|bool the time offset as returned by
17261726 * validateTimeZone() in Special:Preferences
17271727 * @return string
17281728 */
@@ -1740,7 +1740,7 @@
17411741 * @param $adj Bool: whether to adjust the time output according to the
17421742 * user configured offset ($timecorrection)
17431743 * @param $format Mixed: true to use user's date format preference
1744 - * @param $timecorrection String: the time offset as returned by
 1744+ * @param $timecorrection String|bool the time offset as returned by
17451745 * validateTimeZone() in Special:Preferences
17461746 * @return string
17471747 */
@@ -1760,7 +1760,7 @@
17611761 * user configured offset ($timecorrection)
17621762 * @param $format Mixed: what format to return, if it's false output the
17631763 * default one (default true)
1764 - * @param $timecorrection String: the time offset as returned by
 1764+ * @param $timecorrection String|bool the time offset as returned by
17651765 * validateTimeZone() in Special:Preferences
17661766 * @return string
17671767 */
@@ -2756,7 +2756,7 @@
27572757 * @param string $text HTML string to truncate
27582758 * @param int $length (zero/positive) Maximum length (including ellipses)
27592759 * @param string $ellipsis String to append to the truncated text
2760 - * @returns string
 2760+ * @return string
27612761 */
27622762 function truncateHtml( $text, $length, $ellipsis = '...' ) {
27632763 # Use the localized ellipsis character

Status & tagging log