More return type documentation

This commit is contained in:
Sam Reed 2011-02-08 23:18:13 +00:00
parent e42253eb45
commit da3b3fbae4
5 changed files with 36 additions and 0 deletions

View file

@ -192,6 +192,7 @@ class MagicWord {
/**
* Factory: creates an object representing an ID
* @static
* @return MagicWord
*/
static function &get( $id ) {
wfProfileIn( __METHOD__ );

View file

@ -10,6 +10,11 @@
* @ingroup Parser
*/
class CoreParserFunctions {
/**
* @static
* @param $parser Parser
* @return void
*/
static function register( $parser ) {
global $wgAllowDisplayTitle, $wgAllowSlowParserFunctions;
@ -507,6 +512,7 @@ class CoreParserFunctions {
* to the link cache, so the local cache here should be unnecessary, but
* in fact calling getLength() repeatedly for the same $page does seem to
* run one query for each call?
* @param $parser Parser
*/
static function pagesize( $parser, $page = '', $raw = null ) {
static $cache = array();
@ -584,6 +590,12 @@ class CoreParserFunctions {
return self::pad( $string, $length, $padding );
}
/**
* @static
* @param $parser Parser
* @param $text
* @return string
*/
static function anchorencode( $parser, $text ) {
return substr( $parser->guessSectionNameFromWikiText( $text ), 1);
}
@ -598,6 +610,12 @@ class CoreParserFunctions {
}
}
/**
* @static
* @param $parser Parser
* @param $text
* @return string
*/
public static function defaultsort( $parser, $text ) {
$text = trim( $text );
if( strlen( $text ) == 0 )

View file

@ -10,6 +10,11 @@
* @ingroup Parser
*/
class CoreTagHooks {
/**
* @static
* @param $parser Parser
* @return void
*/
static function register( $parser ) {
global $wgRawHtml, $wgUseTeX;
$parser->setHook( 'pre', array( __CLASS__, 'pre' ) );
@ -52,6 +57,13 @@ class CoreTagHooks {
return $wgContLang->armourMath( MathRenderer::renderMath( $content, $attributes, $parser->getOptions() ) );
}
/**
* @static
* @param $content
* @param $attributes
* @param $parser Parser
* @return
*/
static function gallery( $content, $attributes, $parser ) {
return $parser->renderImageGallery( $content, $attributes );
}

View file

@ -28,6 +28,7 @@ class LinkHolderArray {
/**
* Merge another LinkHolderArray into this one
* @param $other LinkHolderArray
*/
function merge( $other ) {
foreach ( $other->internals as $ns => $entries ) {

View file

@ -111,6 +111,10 @@ class Parser_DiffTest
}
}
/**
* @param $parser Parser
* @return bool
*/
function onClearState( &$parser ) {
// hack marker prefixes to get identical output
if ( !isset( $this->dtUniqPrefix ) ) {