/**
* @param Parser $parser
* @param string $s
- * @return
+ * @return string
*/
static function lc( $parser, $s = '' ) {
global $wgContLang;
/**
* @param Parser $parser
* @param string $s
- * @return
+ * @return string
*/
static function uc( $parser, $s = '' ) {
global $wgContLang;
* @param Parser $parser
* @param string $case
* @param string $word
- * @return
+ * @return string
*/
static function grammar( $parser, $case = '', $word = '' ) {
$word = $parser->killMarkers( $word );
/**
* @param Parser $parser
* @param string $username
- * @return
+ * @return string
*/
static function gender( $parser, $username ) {
wfProfileIn( __METHOD__ );
/**
* @param Parser $parser
* @param string $text
- * @return
+ * @return string
*/
static function plural( $parser, $text = '' ) {
$forms = array_slice( func_get_args(), 2 );
* corresponding magic word
* Note: function name changed to "mwnamespace" rather than "namespace"
* to not break PHP 5.3
+ * @param Parser $parser
+ * @param string $title
* @return mixed|string
*/
static function mwnamespace( $parser, $title = null ) {
/**
* Functions to get and normalize pagenames, corresponding to the magic words
* of the same names
+ * @param Parser $parser
+ * @param string $title
* @return string
*/
static function pagename( $parser, $title = null ) {
* Return the number of pages, files or subcats in the given category,
* or 0 if it's nonexistent. This is an expensive parser function and
* can't be called too many times per page.
+ * @param Parser $parser
+ * @param string $name
+ * @param string $arg1
+ * @param string $arg2
* @return string
*/
static function pagesincategory( $parser, $name = '', $arg1 = null, $arg2 = null ) {
* Get the pageid of a specified page
* @param Parser $parser
* @param string $title Title to get the pageid from
+ * @return int|null|string
* @since 1.23
*/
public static function pageid( $parser, $title = null ) {
* Get the id from the last revision of a specified page.
* @param Parser $parser
* @param string $title Title to get the id from
+ * @return int|null|string
* @since 1.23
*/
public static function revisionid( $parser, $title = null ) {
* Get the day from the last revision of a specified page.
* @param Parser $parser
* @param string $title Title to get the day from
+ * @return string
* @since 1.23
*/
public static function revisionday( $parser, $title = null ) {
* Get the day with leading zeros from the last revision of a specified page.
* @param Parser $parser
* @param string $title Title to get the day from
+ * @return string
* @since 1.23
*/
public static function revisionday2( $parser, $title = null ) {
* Get the month with leading zeros from the last revision of a specified page.
* @param Parser $parser
* @param string $title Title to get the month from
+ * @return string
* @since 1.23
*/
public static function revisionmonth( $parser, $title = null ) {
* Get the month from the last revision of a specified page.
* @param Parser $parser
* @param string $title Title to get the month from
+ * @return string
* @since 1.23
*/
public static function revisionmonth1( $parser, $title = null ) {
* Get the year from the last revision of a specified page.
* @param Parser $parser
* @param string $title Title to get the year from
+ * @return string
* @since 1.23
*/
public static function revisionyear( $parser, $title = null ) {
* Get the timestamp from the last revision of a specified page.
* @param Parser $parser
* @param string $title Title to get the timestamp from
+ * @return string
* @since 1.23
*/
public static function revisiontimestamp( $parser, $title = null ) {
* Get the user from the last revision of a specified page.
* @param Parser $parser
* @param string $title Title to get the user from
+ * @return string
* @since 1.23
*/
public static function revisionuser( $parser, $title = null ) {
}
}
if ( $fail ) {
+ /** @todo FIXME: $matches doesn't exist here, what's expected? */
$text = $matches[0];
}
/**
* @todo document
+ * @param string $iso
* @return int|string
*/
function makeNormalYear( $iso ) {
/**
* Get a subset of the current LinkHolderArray which is sufficient to
* interpret the given text.
+ * @param string $text
* @return LinkHolderArray
*/
function getSubArray( $text ) {
/**
* Replace <!--LINK--> link placeholders with actual links, in the buffer
*
+ * @param $text
* @return array Array of link CSS classes, indexed by PDBK.
*/
function replace( &$text ) {
wfProfileIn( __METHOD__ );
- $colours = $this->replaceInternal( $text ); // FIXME: replaceInternal doesn't return a value
+ /** @todo FIXME: replaceInternal doesn't return a value */
+ $colours = $this->replaceInternal( $text );
$this->replaceInterwiki( $text );
wfProfileOut( __METHOD__ );
private $mRevIdForTs;
/**
- * Constructor
- *
* @param array $conf
*/
public function __construct( $conf = array() ) {
* If $frame is not provided, then template variables (e.g., {{{1}}}) within $text are not expanded
*
* @param string $text Text extension wants to have parsed
- * @param PPFrame $frame The frame to use for expanding any template variables
+ * @param bool|PPFrame $frame The frame to use for expanding any template variables
*
* @return string
*/
* hook.
*
* @param string $text Text to be expanded
- * @param PPFrame $frame The frame to use for expanding any template variables
+ * @param bool|PPFrame $frame The frame to use for expanding any template variables
* @return string
* @since 1.19
*/
}
/**
- * TODO: document
+ * @todo Document
* @param string $char
* @private
*
if ( $openmatch or $closematch ) {
$paragraphStack = false;
- # TODO bug 5718: paragraph closed
+ # @todo bug 5718: paragraph closed
$output .= $this->closeParagraph();
if ( $preOpenMatch and !$preCloseMatch ) {
$this->mInPre = true;
* 'expansion-depth-exceeded' (corresponding messages:
* 'expansion-depth-exceeded-warning',
* 'expansion-depth-exceeded-category')
- * @param int|null $current Current value
- * @param int|null $max Maximum allowed, when an explicit limit has been
+ * @param string|int|null $current Current value
+ * @param string|int|null $max Maximum allowed, when an explicit limit has been
* exceeded, provide the values (optional)
*/
function limitationWarn( $limitationType, $current = '', $max = '' ) {
* replacing any variables or templates within the template.
*
* @param array $piece The parts of the template
- * $piece['title']: the title, i.e. the part before the |
- * $piece['parts']: the parameter array
- * $piece['lineStart']: whether the brace was at the start of a line
+ * $piece['title']: the title, i.e. the part before the |
+ * $piece['parts']: the parameter array
+ * $piece['lineStart']: whether the brace was at the start of a line
* @param PPFrame $frame The current frame, contains template arguments
- * @throws MWException
+ * @throws Exception
* @return string The text of the template
* @private
*/
* @param PPFrame $frame The current frame, contains template arguments
* @param string $function Function name
* @param array $args Arguments to the function
+ * @throws MWException
* @return array
*/
public function callParserFunction( $frame, $function, array $args = array() ) {
* Can be overridden via ParserOptions::setTemplateCallback().
*
* @param Title $title
- * @param Parser $parser
+ * @param bool|Parser $parser
*
* @return array
*/
/**
* @param string $caption
- * @param LinkHolderArray $holders
+ * @param LinkHolderArray|bool $holders
* @return mixed|string
*/
protected function stripAltText( $caption, $holders ) {
* values, so they can be safely tested and escaped.
*
* @param string $text
- * @param PPFrame $frame
+ * @param bool|PPFrame $frame
* @return string
*/
function attributeStripCallback( &$text, $frame = false ) {
* @todo document
*/
class ParserCache {
+ /** @var MWMemcached */
private $mMemc;
/**
* Get an instance of this object
/**
* Create a child frame
*
- * @param array $args
- * @param Title $title
+ * @param array|bool $args
+ * @param bool|Title $title
* @param int $indexOffset A number subtracted from the index attributes of the arguments
*
* @return PPFrame
/**
* Get the output string that would result if the close is not found.
*
+ * @param bool|int $openingCount
* @return string
*/
function breakSyntax( $openingCount = false ) {
/**
* @param Preprocessor $preprocessor
- * @param PPFrame_DOM $parent
+ * @param bool|PPFrame_DOM $parent
* @param array $numberedArgs
* @param array $namedArgs
- * @param Title $title
+ * @param bool|Title $title
*/
function __construct( $preprocessor, $parent = false, $numberedArgs = array(),
$namedArgs = array(), $title = false
* Append a PPAccum_Hash
* Takes over ownership of the nodes in the source argument. These nodes may
* subsequently be modified, especially nextSibling.
- * @param PPAccum_Hash $accum
+ * @param PPDAccum_Hash $accum
*/
function addAccum( $accum ) {
if ( $accum->lastNode === false ) {
* @param bool|PPFrame $parent
* @param array $numberedArgs
* @param array $namedArgs
- * @param Title $title
+ * @param bool|Title $title
*/
function __construct( $preprocessor, $parent = false, $numberedArgs = array(),
$namedArgs = array(), $title = false