r81792 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81791‎ | r81792 | r81793 >
Date:23:18, 8 February 2011
Author:reedy
Status:ok
Tags:
Comment:
More return type documentation
Modified paths:
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/includes/parser/CoreParserFunctions.php (modified) (history)
  • /trunk/phase3/includes/parser/CoreTagHooks.php (modified) (history)
  • /trunk/phase3/includes/parser/LinkHolderArray.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser_DiffTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/LinkHolderArray.php
@@ -28,6 +28,7 @@
2929
3030 /**
3131 * Merge another LinkHolderArray into this one
 32+ * @param $other LinkHolderArray
3233 */
3334 function merge( $other ) {
3435 foreach ( $other->internals as $ns => $entries ) {
Index: trunk/phase3/includes/parser/CoreParserFunctions.php
@@ -10,6 +10,11 @@
1111 * @ingroup Parser
1212 */
1313 class CoreParserFunctions {
 14+ /**
 15+ * @static
 16+ * @param $parser Parser
 17+ * @return void
 18+ */
1419 static function register( $parser ) {
1520 global $wgAllowDisplayTitle, $wgAllowSlowParserFunctions;
1621
@@ -507,6 +512,7 @@
508513 * to the link cache, so the local cache here should be unnecessary, but
509514 * in fact calling getLength() repeatedly for the same $page does seem to
510515 * run one query for each call?
 516+ * @param $parser Parser
511517 */
512518 static function pagesize( $parser, $page = '', $raw = null ) {
513519 static $cache = array();
@@ -584,6 +590,12 @@
585591 return self::pad( $string, $length, $padding );
586592 }
587593
 594+ /**
 595+ * @static
 596+ * @param $parser Parser
 597+ * @param $text
 598+ * @return string
 599+ */
588600 static function anchorencode( $parser, $text ) {
589601 return substr( $parser->guessSectionNameFromWikiText( $text ), 1);
590602 }
@@ -598,6 +610,12 @@
599611 }
600612 }
601613
 614+ /**
 615+ * @static
 616+ * @param $parser Parser
 617+ * @param $text
 618+ * @return string
 619+ */
602620 public static function defaultsort( $parser, $text ) {
603621 $text = trim( $text );
604622 if( strlen( $text ) == 0 )
Index: trunk/phase3/includes/parser/Parser_DiffTest.php
@@ -111,6 +111,10 @@
112112 }
113113 }
114114
 115+ /**
 116+ * @param $parser Parser
 117+ * @return bool
 118+ */
115119 function onClearState( &$parser ) {
116120 // hack marker prefixes to get identical output
117121 if ( !isset( $this->dtUniqPrefix ) ) {
Index: trunk/phase3/includes/parser/CoreTagHooks.php
@@ -10,6 +10,11 @@
1111 * @ingroup Parser
1212 */
1313 class CoreTagHooks {
 14+ /**
 15+ * @static
 16+ * @param $parser Parser
 17+ * @return void
 18+ */
1419 static function register( $parser ) {
1520 global $wgRawHtml, $wgUseTeX;
1621 $parser->setHook( 'pre', array( __CLASS__, 'pre' ) );
@@ -52,6 +57,13 @@
5358 return $wgContLang->armourMath( MathRenderer::renderMath( $content, $attributes, $parser->getOptions() ) );
5459 }
5560
 61+ /**
 62+ * @static
 63+ * @param $content
 64+ * @param $attributes
 65+ * @param $parser Parser
 66+ * @return
 67+ */
5668 static function gallery( $content, $attributes, $parser ) {
5769 return $parser->renderImageGallery( $content, $attributes );
5870 }
Index: trunk/phase3/includes/MagicWord.php
@@ -192,6 +192,7 @@
193193 /**
194194 * Factory: creates an object representing an ID
195195 * @static
 196+ * @return MagicWord
196197 */
197198 static function &get( $id ) {
198199 wfProfileIn( __METHOD__ );

Status & tagging log