r111094 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111093‎ | r111094 | r111095 >
Date:21:17, 9 February 2012
Author:reedy
Status:ok
Tags:
Comment:
More documentation improvements
Modified paths:
  • /trunk/extensions/Translate/utils/TTMServer.php (modified) (history)
  • /trunk/extensions/WebFonts/WebFonts.hooks.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)
  • /trunk/phase3/languages/LanguageConverter.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/LanguageConverter.php
@@ -1015,8 +1015,8 @@
10161016 * @param $summary String: edit summary of the edit
10171017 * @param $isMinor Boolean: was the edit marked as minor?
10181018 * @param $isWatch Boolean: did the user watch this page or not?
1019 - * @param $section Unused
1020 - * @param $flags Bitfield
 1019+ * @param $section
 1020+ * @param $flags int Bitfield
10211021 * @param $revision Object: new Revision object or null
10221022 * @return Boolean: true
10231023 */
Index: trunk/phase3/languages/Language.php
@@ -29,6 +29,10 @@
3030 * @ingroup Language
3131 */
3232 class FakeConverter {
 33+
 34+ /**
 35+ * @var Language
 36+ */
3337 var $mLang;
3438 function __construct( $langobj ) { $this->mLang = $langobj; }
3539 function autoConvertToAllVariants( $text ) { return array( $this->mLang->getCode() => $text ); }
@@ -3131,7 +3135,7 @@
31323136 * (b) clear $tag value
31333137 * @param &$tag string Current HTML tag name we are looking at
31343138 * @param $tagType int (0-open tag, 1-close tag)
3135 - * @param $lastCh char|string Character before the '>' that ended this tag
 3139+ * @param $lastCh string Character before the '>' that ended this tag
31363140 * @param &$openTags array Open tag stack (not accounting for $tag)
31373141 */
31383142 private function truncate_endBracket( &$tag, $tagType, $lastCh, &$openTags ) {
@@ -3244,7 +3248,7 @@
32453249 * match up with it.
32463250 *
32473251 * @param $str String: the validated block duration in English
3248 - * @return Somehow translated block duration
 3252+ * @return string Somehow translated block duration
32493253 * @see LanguageFi.php for example implementation
32503254 */
32513255 function translateBlockExpiry( $str ) {
@@ -3583,7 +3587,7 @@
35843588 *
35853589 * @param $code string
35863590 *
3587 - * @return false|string
 3591+ * @return bool|string
35883592 */
35893593 public static function getFallbackFor( $code ) {
35903594 if ( $code === 'en' || !Language::isValidBuiltInCode( $code ) ) {
Index: trunk/extensions/Translate/utils/TTMServer.php
@@ -70,13 +70,15 @@
7171 }
7272 }
7373
 74+ /**
 75+ * @param $mode int
 76+ * @return DatabaseBase
 77+ */
7478 public function getDB( $mode = DB_SLAVE ) {
7579 return wfGetDB( $mode, 'ttmserver', $this->config['database'] );
7680 }
7781
7882 public function update( MessageHandle $handle, $targetText ) {
79 - global $wgContLang;
80 -
8183 if ( !$handle->isValid() || $handle->getCode() === '' ) {
8284 return false;
8385 }
Index: trunk/extensions/WebFonts/WebFonts.hooks.php
@@ -59,6 +59,8 @@
6060
6161 /**
6262 * Hook: ResourceLoaderGetConfigVars
 63+ * @param $vars array
 64+ * @return bool
6365 */
6466 public static function addConfig( &$vars ) {
6567 $vars['wgWebFontsHelpPage'] = wfMsgForContent( 'webfonts-help-page' );

Status & tagging log