}
/**
- * @param $com bool
+ * @param bool $com
* @return bool
*/
function setContainsOldMagic( $com ) {
/**
* setCacheTime() sets the timestamp expressing when the page has been rendered.
* This does not control expiry, see updateCacheExpiry() for that!
- * @param $t string
+ * @param string $t
* @return string
*/
function setCacheTime( $t ) {
/**
* @since 1.23
- * @param $id int Revision id
+ * @param int $id Revision id
*/
function setCacheRevisionId( $id ) {
$this->mCacheRevisionId = $id;
* or equal to the smallest number that was provided as an argument to
* updateCacheExpiry().
*
- * @param $seconds number
+ * @param int $seconds
*/
function updateCacheExpiry( $seconds ) {
$seconds = (int)$seconds;
* per-article cache invalidation timestamps, or if it comes from
* an incompatible older version.
*
- * @param string $touched the affected article's last touched timestamp
- * @return Boolean
+ * @param string $touched The affected article's last touched timestamp
+ * @return bool
*/
public function expired( $touched ) {
global $wgCacheEpoch;
* deployed. Someday that should probably be changed.
*
* @since 1.23
- * @param int $id the affected article's current revision id
- * @return Boolean
+ * @param int $id The affected article's current revision id
+ * @return bool
*/
public function isDifferentRevision( $id ) {
$cached = $this->getCacheRevisionId();
*/
class CoreParserFunctions {
/**
- * @param $parser Parser
+ * @param Parser $parser
* @return void
*/
static function register( $parser ) {
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $part1
* @return array
*/
* Or to encode a value for the HTTP "path", spaces are encoded as '%20'.
* For links to "wiki"s, or similar software, spaces are encoded as '_',
*
- * @param $parser Parser object
+ * @param Parser $parser
* @param string $s The text to encode.
* @param string $arg (optional): The type of encoding.
* @return string
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $s
* @return
*/
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $s
* @return
*/
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $num
* @param string $arg
* @return string
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $case
* @param string $word
* @return
}
/**
- * @param $parser Parser
- * @param $username string
+ * @param Parser $parser
+ * @param string $username
* @return
*/
static function gender( $parser, $username ) {
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $text
* @return
*/
* Override the title of the page when viewed, provided we've been given a
* title which will normalise to the canonical title
*
- * @param $parser Parser: parent parser
- * @param string $text desired title text
- * @return String
+ * @param Parser $parser Parent parser
+ * @param string $text Desired title text
+ * @return string
*/
static function displaytitle( $parser, $text = '' ) {
global $wgRestrictDisplayTitle;
/**
* Matches the given value against the value of given magic word
*
- * @param string $magicword magic word key
- * @param mixed $value value to match
- * @return boolean true on successful match
+ * @param string $magicword Magic word key
+ * @param string $value Value to match
+ * @return bool True on successful match
*/
private static function matchAgainstMagicword( $magicword, $value ) {
$value = trim( strval( $value ) );
/**
* Functions to get and normalize pagenames, corresponding to the magic words
* of the same names
- * @return String
+ * @return string
*/
static function pagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
* Return the size of the given page, 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 $page String Name of page to check (Default: empty string)
- * @param $raw String Should number be human readable with commas or just number
+ * @param Parser $parser
+ * @param string $page Name of page to check (Default: empty string)
+ * @param string $raw Should number be human readable with commas or just number
* @return string
*/
static function pagesize( $parser, $page = '', $raw = null ) {
/**
* Gives language names.
- * @param $parser Parser
- * @param string $code Language code (of which to get name)
- * @param string $inLanguage Language code (in which to get name)
- * @return String
+ * @param Parser $parser
+ * @param string $code Language code (of which to get name)
+ * @param string $inLanguage Language code (in which to get name)
+ * @return string
*/
static function language( $parser, $code = '', $inLanguage = '' ) {
$code = strtolower( $code );
/**
* Unicode-safe str_pad with the restriction that $length is forced to be <= 500
+ * @param Parser $parser
+ * @param string $string
+ * @param int $length
+ * @param string $padding
+ * @param int $direction
* @return string
*/
static function pad( $parser, $string, $length, $padding = '0', $direction = STR_PAD_RIGHT ) {
}
/**
- * @param $parser Parser
- * @param $text
+ * @param Parser $parser
+ * @param string $text
* @return string
*/
static function anchorencode( $parser, $text ) {
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @param string $text The sortkey to use
* @param string $uarg Either "noreplace" or "noerror" (in en)
* both suppress errors, and noreplace does nothing if
/**
* Parser function to extension tag adaptor
+ * @param Parser $parser
+ * @param PPFrame $frame
+ * @param array $args
* @return string
*/
public static function tagObj( $parser, $frame, $args ) {
* For a given title, which is equal to the current parser title,
* the revision object from the parser is used, when that is the current one
*
- * @param $parser Parser
- * @param $title Title
+ * @param Parser $parser
+ * @param Title $title
* @return Revision
* @since 1.23
*/
/**
* Get the pageid of a specified page
- * @param $parser Parser
- * @param $title string Title to get the pageid from
+ * @param Parser $parser
+ * @param string $title Title to get the pageid from
* @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 $title string Title to get the id from
+ * @param Parser $parser
+ * @param string $title Title to get the id from
* @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 $title string Title to get the day from
+ * @param Parser $parser
+ * @param string $title Title to get the day from
* @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 $title string Title to get the day from
+ * @param Parser $parser
+ * @param string $title Title to get the day from
* @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 $title string Title to get the month from
+ * @param Parser $parser
+ * @param string $title Title to get the month from
* @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 $title string Title to get the month from
+ * @param Parser $parser
+ * @param string $title Title to get the month from
* @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 $title string Title to get the year from
+ * @param Parser $parser
+ * @param string $title Title to get the year from
* @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 $title string Title to get the timestamp from
+ * @param Parser $parser
+ * @param string $title Title to get the timestamp from
* @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 $title string Title to get the user from
+ * @param Parser $parser
+ * @param string $title Title to get the user from
* @since 1.23
*/
public static function revisionuser( $parser, $title = null ) {
*/
class CoreTagHooks {
/**
- * @param $parser Parser
+ * @param Parser $parser
* @return void
*/
static function register( $parser ) {
*
* Uses undocumented extended tag hook return values, introduced in r61913.
*
- * @param $content string
- * @param $attributes array
- * @param $parser Parser
+ * @param string $content
+ * @param array $attributes
+ * @param Parser $parser
* @throws MWException
* @return array
*/
*
* Uses undocumented extended tag hook return values, introduced in r61913.
*
- * @param $content string
- * @param $attributes array
- * @param $parser Parser
+ * @param string $content
+ * @param array $attributes
+ * @param Parser $parser
* @return array
*/
static function nowiki( $content, $attributes, $parser ) {
const LAST = 8;
/**
- * @param $lang Language In which language to format the date
+ * @param Language $lang In which language to format the date
*/
function __construct( Language $lang ) {
$this->lang = $lang;
/**
* Get a DateFormatter object
*
- * @param $lang Language|string|null In which language to format the date
+ * @param Language|string|null $lang In which language to format the date
* Defaults to the site content language
* @return DateFormatter object
*/
/**
* @param string $preference User preference
* @param string $text Text to reformat
- * @param array $options can contain 'linked' and/or 'match-whole'
+ * @param array $options Array can contain 'linked' and/or 'match-whole'
*
* @return string
*/
}
/**
- * @param $matches
+ * @param array $matches
* @return string
*/
function replace( $matches ) {
}
/**
- * @param $bits array
- * @param $link bool
+ * @param array $bits
+ * @param bool $link
* @return string
*/
function formatDate( $bits, $link = true ) {
/**
* Makes an ISO month, e.g. 02, from a month name
- * @param string $monthName month name
+ * @param string $monthName Month name
* @return string ISO month name
*/
function makeIsoMonth( $monthName ) {
* serializing at present.
*
* Compact the titles, only serialize the text form.
- * @return array
- */
+ * @return array
+ */
function __sleep() {
foreach ( $this->internals as &$nsLinks ) {
foreach ( $nsLinks as &$entry ) {
/**
* Merge another LinkHolderArray into this one
- * @param $other LinkHolderArray
+ * @param LinkHolderArray $other
*/
function merge( $other ) {
foreach ( $other->internals as $ns => $entries ) {
* converted for use in the destination link holder. The resulting array of
* strings will be returned.
*
- * @param $other LinkHolderArray
- * @param array $texts of strings
- * @return Array
+ * @param LinkHolderArray $other
+ * @param array $texts Array of strings
+ * @return array
*/
function mergeForeign( $other, $texts ) {
$this->tempIdOffset = $idOffset = $this->parent->nextLinkID();
* parsing of interwiki links, and secondly to allow all existence checks and
* article length checks (for stub links) to be bundled into a single query.
*
- * @param $nt Title
- * @param $text String
+ * @param Title $nt
+ * @param string $text
* @param array $query [optional]
* @param string $trail [optional]
* @param string $prefix [optional]
/**
* Replace <!--LINK--> link placeholders with actual links, in the buffer
*
- * @return array of link CSS classes, indexed by PDBK.
+ * @return array Array of link CSS classes, indexed by PDBK.
*/
function replace( &$text ) {
wfProfileIn( __METHOD__ );
/**
* Replace internal links
+ * @param string $text
*/
protected function replaceInternal( &$text ) {
if ( !$this->internals ) {
/**
* Replace interwiki links
+ * @param string $text
*/
protected function replaceInterwiki( &$text ) {
if ( empty( $this->interwikis ) ) {
/**
* Modify $this->internals and $colours according to language variant linking rules
+ * @param array $colours
*/
protected function doVariants( &$colours ) {
global $wgContLang;
* Replace <!--LINK--> link placeholders with plain text of links
* (not HTML-formatted).
*
- * @param $text String
- * @return String
+ * @param string $text
+ * @return string
*/
function replaceText( $text ) {
wfProfileIn( __METHOD__ );
/**
* Callback for replaceText()
*
- * @param $matches Array
+ * @param array $matches
* @return string
* @private
*/
var $mUniqPrefix;
/**
- * @var Array with the language name of each language link (i.e. the
+ * @var array Array with the language name of each language link (i.e. the
* interwiki prefix) in the key, value arbitrary. Used to avoid sending
* duplicate language links to the ParserOutput.
*/
/**
* Constructor
*
- * @param $conf array
+ * @param array $conf
*/
public function __construct( $conf = array() ) {
$this->mConf = $conf;
* Do not call this function recursively.
*
* @param string $text text we want to parse
- * @param $title Title object
- * @param $options ParserOptions
- * @param $linestart boolean
- * @param $clearState boolean
- * @param int $revid number to pass in {{REVISIONID}}
- * @return ParserOutput a ParserOutput
+ * @param Title $title
+ * @param ParserOptions $options
+ * @param bool $linestart
+ * @param bool $clearState
+ * @param int $revid Number to pass in {{REVISIONID}}
+ * @return ParserOutput A ParserOutput
*/
public function parse( $text, Title $title, ParserOptions $options, $linestart = true, $clearState = true, $revid = null ) {
/**
*
* 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 string $text Text extension wants to have parsed
* @param PPFrame $frame The frame to use for expanding any template variables
*
* @return string
/**
* Expand templates and variables in the text, producing valid, static wikitext.
* Also removes comments.
+ * @param string $text
+ * @param Title $title
+ * @param ParserOptions $options
+ * @param int|null $revid
* @return mixed|string
*/
function preprocess( $text, Title $title = null, ParserOptions $options, $revid = null ) {
* Recursive parser entry point that can be called from an extension tag
* hook.
*
- * @param string $text text to be expanded
+ * @param string $text Text to be expanded
* @param PPFrame $frame The frame to use for expanding any template variables
* @return string
* @since 1.19
* transclusion, comments, templates, arguments, tags hooks and parser
* functions are untouched.
*
- * @param $text String
- * @param $title Title
- * @param $options ParserOptions
- * @param $params Array
- * @return String
+ * @param string $text
+ * @param Title $title
+ * @param ParserOptions $options
+ * @param array $params
+ * @return string
*/
public function getPreloadText( $text, Title $title, ParserOptions $options, $params = array() ) {
$msg = new RawMessage( $text );
/**
* Accessor for mUniqPrefix.
*
- * @return String
+ * @return string
*/
public function uniqPrefix() {
if ( !isset( $this->mUniqPrefix ) ) {
/**
* Set the context title
*
- * @param $t Title
+ * @param Title $t
*/
function setTitle( $t ) {
if ( !$t ) {
/**
* Accessor for the Title object
*
- * @return Title object
+ * @return Title
*/
function getTitle() {
return $this->mTitle;
/**
* Accessor/mutator for the Title object
*
- * @param $x Title object or null to just get the current one
- * @return Title object
+ * @param Title $x Title object or null to just get the current one
+ * @return Title
*/
function Title( $x = null ) {
return wfSetVar( $this->mTitle, $x );
/**
* Set the output type
*
- * @param int $ot new value
+ * @param int $ot New value
*/
function setOutputType( $ot ) {
$this->mOutputType = $ot;
* Accessor/mutator for the output type
*
* @param int|null $x New value or null to just get the current one
- * @return Integer
+ * @return int
*/
function OutputType( $x = null ) {
return wfSetVar( $this->mOutputType, $x );
/**
* Get the ParserOutput object
*
- * @return ParserOutput object
+ * @return ParserOutput
*/
function getOutput() {
return $this->mOutput;
/**
* Accessor/mutator for the ParserOptions object
*
- * @param $x ParserOptions New value or null to just get the current one
+ * @param ParserOptions $x New value or null to just get the current one
* @return ParserOptions Current ParserOptions object
*/
function Options( $x = null ) {
}
/**
- * @param $id int
+ * @param int $id
*/
function setLinkID( $id ) {
$this->mLinkID = $id;
/**
* Get the language object for language conversion
+ * @return Language|null
*/
function getConverterLanguage() {
return $this->getTargetLanguage();
* Get a User object either from $this->mUser, if set, or from the
* ParserOptions object otherwise
*
- * @return User object
+ * @return User
*/
function getUser() {
if ( !is_null( $this->mUser ) ) {
/**
* Get a preprocessor object
*
- * @return Preprocessor instance
+ * @return Preprocessor
*/
function getPreprocessor() {
if ( !isset( $this->mPreprocessor ) ) {
* Returns the unique tag which must be inserted into the stripped text
* The tag will be replaced with the original text in unstrip()
*
- * @param $text string
+ * @param string $text
*
* @return string
*/
* parse the wiki syntax used to render tables
*
* @private
+ * @param string $text
* @return string
*/
function doTableStuff( $text ) {
*
* @private
*
- * @param $text string
- * @param $isMain bool
- * @param $frame bool
+ * @param string $text
+ * @param bool $isMain
+ * @param bool $frame
*
* @return string
*/
* DML
* @private
*
- * @param $text string
+ * @param string $text
*
* @return string
*/
/**
* @throws MWException
- * @param $m array
+ * @param array $m
* @return HTML|string
*/
function magicLinkCallback( $m ) {
/**
* Make a free external link, given a user-supplied URL
*
- * @param $url string
+ * @param string $url
*
* @return string HTML
* @private
*
* @private
*
- * @param $text string
+ * @param string $text
*
* @return string
*/
* Replace single quotes with HTML markup
* @private
*
- * @param $text string
+ * @param string $text
*
* @return string the altered text
*/
/**
* Helper function for doAllQuotes()
*
- * @param $text string
+ * @param string $text
*
* @return string
*/
*
* @private
*
- * @param $text string
+ * @param string $text
*
* @throws MWException
* @return string
* Get the rel attribute for a particular external link.
*
* @since 1.21
- * @param string|bool $url optional URL, to extract the domain from for rel =>
+ * @param string|bool $url Optional URL, to extract the domain from for rel =>
* nofollow if appropriate
- * @param $title Title optional Title, for wgNoFollowNsExceptions lookups
- * @return string|null rel attribute for $url
+ * @param Title $title Optional Title, for wgNoFollowNsExceptions lookups
+ * @return string|null Rel attribute for $url
*/
public static function getExternalLinkRel( $url = false, $title = null ) {
global $wgNoFollowLinks, $wgNoFollowNsExceptions, $wgNoFollowDomainExceptions;
* (depending on configuration, namespace, and the URL's domain) and/or a
* target attribute (depending on configuration).
*
- * @param string|bool $url optional URL, to extract the domain from for rel =>
+ * @param string|bool $url Optional URL, to extract the domain from for rel =>
* nofollow if appropriate
- * @return Array associative array of HTML attributes
+ * @return array Associative array of HTML attributes
*/
function getExternalLinkAttribs( $url = false ) {
$attribs = array();
/**
* Replace unusual URL escape codes with their equivalent characters
*
- * @param $url String
- * @return String
+ * @param string $url
+ * @return string
*
* @todo This can merge genuinely required bits in the path or query string,
* breaking legit URLs. A proper fix would treat the various parts of
* Callback function used in replaceUnusualEscapes().
* Replaces unusual URL escape codes with their equivalent character
*
- * @param $matches array
+ * @param array $matches
*
* @return string
*/
* option, through the exception, or through the on-wiki whitelist
* @private
*
- * $param $url string
+ * $param string $url
*
* @return string
*/
/**
* Process [[ ]] wikilinks (RIL)
- * @param $s
+ * @param string $s
* @throws MWException
* @return LinkHolderArray
*
/**
* Return true if subpage links should be expanded on this page.
- * @return Boolean
+ * @return bool
*/
function areSubpagesAllowed() {
# Some namespaces don't allow subpages
* of both arguments, starting at the beginning of both.
* @private
*
- * @param $st1 string
- * @param $st2 string
+ * @param string $st1
+ * @param string $st2
*
* @return int
*/
* element appropriate to the prefix character passed into them.
* @private
*
- * @param $char string
+ * @param string $char
*
* @return string
*/
/**
* TODO: document
- * @param $char String
+ * @param string $char
* @private
*
* @return string
/**
* TODO: document
- * @param $char String
+ * @param string $char
* @private
*
* @return string
* Split up a string on ':', ignoring any occurrences inside tags
* to prevent illegal overlapping.
*
- * @param string $str the string to split
- * @param &$before String set to everything before the ':'
- * @param &$after String set to everything after the ':'
+ * @param string $str The string to split
+ * @param string &$before Set to everything before the ':'
+ * @param string &$after Set to everything after the ':'
* @throws MWException
- * @return String the position of the ':', or false if none found
+ * @return string The position of the ':', or false if none found
*/
function findColonNoLinks( $str, &$before, &$after ) {
wfProfileIn( __METHOD__ );
*
* @private
*
- * @param $index integer
- * @param bool|\PPFrame $frame
+ * @param int $index
+ * @param bool|PPFrame $frame
*
* @throws MWException
* @return string
/**
* Return a three-element array: leading whitespace, string contents, trailing whitespace
*
- * @param $s string
+ * @param string $s
*
* @return array
*/
* self::OT_PREPROCESS: templates but not extension tags
* self::OT_HTML: all templates and extension tags
*
- * @param string $text the text to transform
- * @param $frame PPFrame Object describing the arguments passed to the template.
+ * @param string $text The text to transform
+ * @param PPFrame $frame Object describing the arguments passed to the template.
* Arguments may also be provided as an associative array, as was the usual case before MW1.12.
* Providing arguments this way may be useful for extensions wishing to perform variable replacement explicitly.
- * @param $argsOnly Boolean only do argument (triple-brace) expansion, not double-brace expansion
+ * @param bool $argsOnly Only do argument (triple-brace) expansion, not double-brace expansion
* @private
*
* @return string
/**
* Clean up argument array - refactored in 1.9 so parserfunctions can use it, too.
*
- * @param $args array
+ * @param array $args
*
* @return array
*/
* Warn the user when a parser limitation is reached
* Will warn at most once the user per limitation type
*
- * @param string $limitationType should be one of:
+ * @param string $limitationType Should be one of:
* 'expensive-parserfunction' (corresponding messages:
* 'expensive-parserfunction-warning',
* 'expensive-parserfunction-category')
* nowiki: bool, wiki markup in $text should be escaped
*
* @since 1.21
- * @param $frame PPFrame The current frame, contains template arguments
- * @param $function string Function name
- * @param $args array Arguments to the function
+ * @param PPFrame $frame The current frame, contains template arguments
+ * @param string $function Function name
+ * @param array $args Arguments to the function
* @return array
*/
public function callParserFunction( $frame, $function, array $args = array() ) {
* Get the semi-parsed DOM representation of a template with a given title,
* and its redirect destination title. Cached.
*
- * @param $title Title
+ * @param Title $title
*
* @return array
*/
/**
* Fetch the unparsed text of a template and register a reference to it.
* @param Title $title
- * @return Array ( string or false, Title )
+ * @return array ( string or false, Title )
*/
function fetchTemplateAndTitle( $title ) {
$templateCb = $this->mOptions->getTemplateCallback(); # Defaults to Parser::statelessFetchTemplate()
/**
* Fetch the unparsed text of a template and register a reference to it.
* @param Title $title
- * @return mixed string or false
+ * @return string|bool
*/
function fetchTemplate( $title ) {
$rv = $this->fetchTemplateAndTitle( $title );
* If 'broken' is a key in $options then the file will appear as a broken thumbnail.
* @param Title $title
* @param array $options Array of options to RepoGroup::findFile
- * @return Array ( File or false, Title of file )
+ * @return array ( File or false, Title of file )
*/
function fetchFileAndTitle( $title, $options = array() ) {
$file = $this->fetchFileNoRegister( $title, $options );
*
* @param Title $title
* @param array $options Array of options to RepoGroup::findFile
- * @return File or false
+ * @return File|bool
*/
protected function fetchFileNoRegister( $title, $options = array() ) {
if ( isset( $options['broken'] ) ) {
/**
* Transclude an interwiki link.
*
- * @param $title Title
- * @param $action
+ * @param Title $title
+ * @param string $action
*
* @return string
*/
}
/**
- * @param $url string
- * @return Mixed|String
+ * @param string $url
+ * @return mixed|string
*/
function fetchScaryTemplateMaybeFromCache( $url ) {
global $wgTranscludeCacheExpiry;
* Triple brace replacement -- used for template arguments
* @private
*
- * @param $piece array
- * @param $frame PPFrame
+ * @param array $piece
+ * @param PPFrame $frame
*
* @return array
*/
* attributes Optional associative array of parsed attributes
* inner Contents of extension element
* noClose Original text did not have a close tag
- * @param $frame PPFrame
+ * @param PPFrame $frame
*
* @throws MWException
* @return string
*
* @param string $type The type of expansion
* @param int $size The size of the text
- * @return bool false if this inclusion would take it over the maximum, true otherwise
+ * @return bool False if this inclusion would take it over the maximum, true otherwise
*/
function incrementIncludeSize( $type, $size ) {
if ( $this->mIncludeSizes[$type] + $size > $this->mOptions->getMaxIncludeSize() ) {
/**
* Increment the expensive function count
*
- * @return bool false if the limit has been exceeded
+ * @return bool False if the limit has been exceeded
*/
function incrementExpensiveFunctionCount() {
$this->mExpensiveFunctionCount++;
* Strip double-underscore items like __NOGALLERY__ and __NOTOC__
* Fills $this->mDoubleUnderscores, returns the modified text
*
- * @param $text string
+ * @param string $text
*
* @return string
*/
* It loops through all headlines, collects the necessary data, then splits up the
* string and re-inserts the newly formatted headlines.
*
- * @param $text String
- * @param string $origText original, untouched wikitext
- * @param $isMain Boolean
+ * @param string $text
+ * @param string $origText Original, untouched wikitext
+ * @param bool $isMain
* @return mixed|string
* @private
*/
/**
* Pre-save transform helper function
*
- * @param $text string
- * @param $user User
+ * @param string $text
+ * @param User $user
*
* @return string
*/
* Do not reuse this parser instance after calling getUserSig(),
* as it may have changed if it's the $wgParser.
*
- * @param $user User
- * @param string|bool $nickname nickname to use or false to use user's default nickname
- * @param $fancySig Boolean|null whether the nicknname is the complete signature
- * or null to use default value
+ * @param User $user
+ * @param string|bool $nickname Nickname to use or false to use user's default nickname
+ * @param bool|null $fancySig whether the nicknname is the complete signature
+ * or null to use default value
* @return string
*/
function getUserSig( &$user, $nickname = false, $fancySig = null ) {
/**
* Check that the user's signature contains no bad XML
*
- * @param $text String
- * @return mixed An expanded string, or false if invalid.
+ * @param string $text
+ * @return string|bool An expanded string, or false if invalid.
*/
function validateSig( $text ) {
return Xml::isWellFormedXmlFragment( $text ) ? $text : false;
* Set up some variables which are usually set up in parse()
* so that an external function can call some class members with confidence
*
- * @param $title Title|null
- * @param $options ParserOptions
- * @param $outputType
- * @param $clearState bool
+ * @param Title|null $title
+ * @param ParserOptions $options
+ * @param int $outputType
+ * @param bool $clearState
*/
public function startExternalParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) {
$this->startParse( $title, $options, $outputType, $clearState );
}
/**
- * @param $title Title|null
- * @param $options ParserOptions
- * @param $outputType
- * @param $clearState bool
+ * @param Title|null $title
+ * @param ParserOptions $options
+ * @param int $outputType
+ * @param bool $clearState
*/
private function startParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) {
$this->setTitle( $title );
/**
* Get all registered function hook identifiers
*
- * @return Array
+ * @return array
*/
function getFunctionHooks() {
return array_keys( $this->mFunctionHooks );
* Create a tag function, e.g. "<test>some stuff</test>".
* Unlike tag hooks, tag functions are parsed at preprocessor level.
* Unlike parser functions, their content is not preprocessed.
- * @param $tag
- * @param $callback
- * @param $flags
+ * @param string $tag
+ * @param callable $callback
+ * @param int $flags
* @throws MWException
* @return null
*/
* Replace "<!--LINK-->" link placeholders with actual links, in the buffer
* Placeholders created in Skin::makeLinkObj()
*
- * @param $text string
- * @param $options int
+ * @param string $text
+ * @param int $options
*
- * @return array of link CSS classes, indexed by PDBK.
+ * @return array Array of link CSS classes, indexed by PDBK.
*/
function replaceLinkHolders( &$text, $options = 0 ) {
return $this->mLinkHolders->replace( $text );
* Replace "<!--LINK-->" link placeholders with plain text of links
* (not HTML-formatted).
*
- * @param $text String
- * @return String
+ * @param string $text
+ * @return string
*/
function replaceLinkHoldersText( $text ) {
return $this->mLinkHolders->replaceText( $text );
}
/**
- * @param $handler
+ * @param string $handler
* @return array
*/
function getImageParams( $handler ) {
/**
* Parse image options text and use it to make an image
*
- * @param $title Title
- * @param $options String
- * @param $holders LinkHolderArray|bool
+ * @param Title $title
+ * @param string $options
+ * @param LinkHolderArray|bool $holders
* @return string HTML
*/
function makeImage( $title, $options, $holders = false ) {
}
/**
- * @param $caption
- * @param $holders LinkHolderArray
- * @return mixed|String
+ * @param string $caption
+ * @param LinkHolderArray $holders
+ * @return mixed|string
*/
protected function stripAltText( $caption, $holders ) {
# Strip bad stuff out of the title (tooltip). We can't just use
* Callback from the Sanitizer for expanding items found in HTML attribute
* values, so they can be safely tested and escaped.
*
- * @param $text String
- * @param $frame PPFrame
- * @return String
+ * @param string $text
+ * @param PPFrame $frame
+ * @return string
*/
function attributeStripCallback( &$text, $frame = false ) {
$text = $this->replaceVariables( $text, $frame );
* Transparent tag hooks are like regular XML-style tag hooks, except they
* operate late in the transformation sequence, on HTML instead of wikitext.
*
- * @param $text string
+ * @param string $text
*
* @return string
*/
* External callers should use the getSection and replaceSection methods.
*
* @param string $text Page wikitext
- * @param string $section a section identifier string of the form:
+ * @param string $section A section identifier string of the form:
* "<flag1> - <flag2> - ... - <section number>"
*
* Currently the only recognised flag is "T", which means the target section number
*
* If a section contains subsections, these are also returned.
*
- * @param string $text text to look in
- * @param string $section section identifier
- * @param string $deftext default to return if section is not found
- * @return string text of the requested section
+ * @param string $text Text to look in
+ * @param string $section Section identifier
+ * @param string $deftext Default to return if section is not found
+ * @return string Text of the requested section
*/
public function getSection( $text, $section, $deftext = '' ) {
return $this->extractSections( $text, $section, "get", $deftext );
/**
* Get the revision object for $this->mRevisionId
*
- * @return Revision|null either a Revision object or null
+ * @return Revision|null Either a Revision object or null
* @since 1.23 (public since 1.23)
*/
public function getRevisionObject() {
/**
* Get the timestamp associated with the current revision, adjusted for
* the default server-local timestamp
+ * @return string
*/
function getRevisionTimestamp() {
if ( is_null( $this->mRevisionTimestamp ) ) {
/**
* Get the size of the revision
*
- * @return int|null revision size
+ * @return int|null Revision size
*/
function getRevisionSize() {
if ( is_null( $this->mRevisionSize ) ) {
* Accessor for $mDefaultSort
* Unlike getDefaultSort(), will return false if none is set
*
- * @return string or false
+ * @return string|bool
*/
public function getCustomDefaultSort() {
return $this->mDefaultSort;
* presumably extracted from a heading, for example "Header" from
* "== Header ==".
*
- * @param $text string
+ * @param string $text
*
* @return string
*/
* to create valid section anchors by mimicing the output of the
* parser when headings are parsed.
*
- * @param string $text text string to be stripped of wikitext
+ * @param string $text Text string to be stripped of wikitext
* for use in a Section anchor
* @return string Filtered text string
*/
/**
* strip/replaceVariables/unstrip for preprocessor regression testing
*
- * @param $text string
- * @param $title Title
- * @param $options ParserOptions
- * @param $outputType int
+ * @param string $text
+ * @param Title $title
+ * @param ParserOptions $options
+ * @param int $outputType
*
* @return string
*/
}
/**
- * @param $text string
- * @param $title Title
- * @param $options ParserOptions
+ * @param string $text
+ * @param Title $title
+ * @param ParserOptions $options
* @return string
*/
function testPst( $text, Title $title, ParserOptions $options ) {
}
/**
- * @param $text
- * @param $title Title
- * @param $options ParserOptions
+ * @param string $text
+ * @param Title $title
+ * @param ParserOptions $options
* @return string
*/
function testPreprocess( $text, Title $title, ParserOptions $options ) {
* two strings will be replaced with the value returned by the callback in
* each case.
*
- * @param $s string
- * @param $callback
+ * @param string $s
+ * @param callable $callback
*
* @return string
*/
/**
* Remove any strip markers found in the given text.
*
- * @param $text Input string
+ * @param string $text Input string
* @return string
*/
function killMarkers( $text ) {
* unserializeHalfParsedText(). The text can then be safely incorporated into
* the return value of a parser hook.
*
- * @param $text string
+ * @param string $text
*
* @return array
*/
*
* @param array $data Serialized data
* @throws MWException
- * @return String
+ * @return string
*/
function unserializeHalfParsedText( $data ) {
if ( !isset( $data['version'] ) || $data['version'] != self::HALF_PARSED_VERSION ) {
* serializeHalfParsedText(), is compatible with the current version of the
* parser.
*
- * @param $data Array
+ * @param array $data
*
* @return bool
*/
/**
* Parsed a width param of imagelink like 300px or 200x300px
*
- * @param $value String
+ * @param string $value
*
* @return array
* @since 1.20
* Setup a cache pathway with a given back-end storage mechanism.
* May be a memcached client or a BagOStuff derivative.
*
- * @param $memCached Object
+ * @param MWMemcached $memCached
* @throws MWException
*/
protected function __construct( $memCached ) {
}
/**
- * @param $article Article
- * @param $hash string
+ * @param Article $article
+ * @param string $hash
* @return mixed|string
*/
protected function getParserOutputKey( $article, $hash ) {
}
/**
- * @param $article Article
+ * @param Article $article
* @return mixed|string
*/
protected function getOptionsKey( $article ) {
* English preferences. That's why we take into account *all* user
* options. (r70809 CR)
*
- * @param $article Article
- * @param $popts ParserOptions
+ * @param Article $article
+ * @param ParserOptions $popts
* @return string
*/
function getETag( $article, $popts ) {
/**
* Retrieve the ParserOutput from ParserCache, even if it's outdated.
- * @param $article Article
- * @param $popts ParserOptions
+ * @param Article $article
+ * @param ParserOptions $popts
* @return ParserOutput|bool False on failure
*/
public function getDirty( $article, $popts ) {
*
* {{int: }} uses this which used to produce inconsistent link tables (bug 14404).
*
- * @return Language object
+ * @return Language
* @since 1.19
*/
function getUserLangObj() {
/**
* Same as getUserLangObj() but returns a string instead.
*
- * @return String Language code
+ * @return string Language code
* @since 1.17
*/
function getUserLang() {
/**
* Constructor
- * @param $user User object
- * @param $lang Language object
+ * @param User $user
+ * @param Language $lang
*/
function __construct( $user = null, $lang = null ) {
if ( $user === null ) {
* Get a ParserOptions object from a given user.
* Language will be taken from $wgLang.
*
- * @param $user User object
- * @return ParserOptions object
+ * @param User $user
+ * @return ParserOptions
*/
public static function newFromUser( $user ) {
return new ParserOptions( $user );
/**
* Get a ParserOptions object from a given user and language
*
- * @param $user User object
- * @param $lang Language object
- * @return ParserOptions object
+ * @param User $user
+ * @param Language $lang
+ * @return ParserOptions
*/
public static function newFromUserAndLang( User $user, Language $lang ) {
return new ParserOptions( $user, $lang );
/**
* Get a ParserOptions object from a IContextSource object
*
- * @param $context IContextSource object
- * @return ParserOptions object
+ * @param IContextSource $context
+ * @return ParserOptions
*/
public static function newFromContext( IContextSource $context ) {
return new ParserOptions( $context->getUser(), $context->getLanguage() );
/**
* Get user options
*
- * @param $user User object
- * @param $lang Language object
+ * @param User $user
+ * @param Language $lang
*/
private function initialiseFromUser( $user, $lang ) {
global $wgInterwikiMagic, $wgAllowExternalImages,
/**
* Registers a callback for tracking which ParserOptions which are used.
* This is a private API with the parser.
+ * @param callable $callback
*/
function registerWatcher( $callback ) {
$this->onAccessCallback = $callback;
/**
* Called when an option is accessed.
- * @param string $optionName name of the option
+ * @param string $optionName Name of the option
*/
public function optionUsed( $optionName ) {
if ( $this->onAccessCallback ) {
/**
* callback used by getText to replace editsection tokens
* @private
- * @param $m
+ * @param array $m
* @throws MWException
* @return mixed
*/
/**
* Checks, if a url is pointing to the own server
*
- * @param string $internal the server to check against
- * @param string $url the url to check
+ * @param string $internal The server to check against
+ * @param string $url The url to check
* @return bool
*/
static function isLinkInternal( $internal, $url ) {
/**
* Record a local or interwiki inline link for saving in future link tables.
*
- * @param $title Title object
- * @param $id Mixed: optional known page_id so we can skip the lookup
+ * @param Title $title
+ * @param int|null $id Optional known page_id so we can skip the lookup
*/
function addLink( Title $title, $id = null ) {
if ( $title->isExternal() ) {
* Register a file dependency for this output
* @param string $name Title dbKey
* @param string $timestamp MW timestamp of file creation (or false if non-existing)
- * @param string $sha1 base 36 SHA-1 of file (or false if non-existing)
+ * @param string $sha1 Base 36 SHA-1 of file (or false if non-existing)
* @return void
*/
function addImage( $name, $timestamp = null, $sha1 = null ) {
/**
* Register a template dependency for this output
- * @param $title Title
- * @param $page_id
- * @param $rev_id
+ * @param Title $title
+ * @param int $page_id
+ * @param int $rev_id
* @return void
*/
function addTemplate( $title, $page_id, $rev_id ) {
}
/**
- * @param $title Title object, must be an interwiki link
+ * @param Title $title Title object, must be an interwiki link
* @throws MWException if given invalid input
*/
function addInterwikiLink( $title ) {
* Add some text to the "<head>".
* If $tag is set, the section with that tag will only be included once
* in a given page.
+ * @param string $section
+ * @param string|bool $tag
*/
function addHeadItem( $section, $tag = false ) {
if ( $tag !== false ) {
/**
* Add one or more variables to be set in mw.config in JavaScript.
*
- * @param $keys {String|Array} Key or array of key/value pairs.
- * @param $value {Mixed} [optional] Value of the configuration variable.
+ * @param string|array $keys Key or array of key/value pairs.
+ * @param mixed $value [optional] Value of the configuration variable.
* @since 1.23
*/
public function addJsConfigVars( $keys, $value = null ) {
/**
* Copy items from the OutputPage object into this one
*
- * @param $out OutputPage object
+ * @param OutputPage $out
*/
public function addOutputPageMetadata( OutputPage $out ) {
$this->addModules( $out->getModules() );
/**
* Get the title to be used for display
*
- * @return String
+ * @return string
*/
public function getDisplayTitle() {
$t = $this->getTitleText();
/**
* Returns the options from its ParserOptions which have been taken
* into account to produce this output or false if not available.
- * @return mixed Array
+ * @return array
*/
public function getUsedOptions() {
if ( !isset( $this->mAccessedOptions ) ) {
* @see ParserCache::save
* @see ParserOptions::addExtraKey
* @see ParserOptions::optionsHash
+ * @param string $option
*/
public function recordOption( $option ) {
$this->mAccessedOptions[$option] = true;
*
* @since 1.20
*
- * @param $title Title The title of the page we're updating. If not given, a title object will be created
- * based on $this->getTitleText()
- * @param $recursive Boolean: queue jobs for recursive updates?
+ * @param Title $title The title of the page we're updating. If not given, a title object will
+ * be created based on $this->getTitleText()
+ * @param bool $recursive Queue jobs for recursive updates?
*
- * @return Array. An array of instances of DataUpdate
+ * @return array An array of instances of DataUpdate
*/
public function getSecondaryDataUpdates( Title $title = null, $recursive = true ) {
if ( is_null( $title ) ) {
* @since 1.21
*
* @param string $key The key for accessing the data. Extensions should take care to avoid
- * conflicts in naming keys. It is suggested to use the extension's name as a
- * prefix.
+ * conflicts in naming keys. It is suggested to use the extension's name as a prefix.
*
* @param mixed $value The value to set. Setting a value to null is equivalent to removing
- * the value.
+ * the value.
*/
public function setExtensionData( $key, $value ) {
if ( $value === null ) {
}
/**
- * @param $parser Parser
+ * @param Parser $parser
* @return bool
*/
function onClearState( &$parser ) {
/**
* Create a new preprocessor object based on an initialised Parser object
*
- * @param $parser Parser
+ * @param Parser $parser
*/
function __construct( $parser );
/**
* Create a new custom frame for programmatic use of parameter replacement as used in some extensions
*
- * @param $args array
+ * @param array $args
*
* @return PPFrame
*/
/**
* Create a new custom node for programmatic use of parameter replacement as used in some extensions
*
- * @param $values
+ * @param array $values
*/
function newPartNodeArray( $values );
/**
* Preprocess text to a PPNode
*
- * @param $text
- * @param $flags
+ * @param string $text
+ * @param int $flags
*
* @return PPNode
*/
/**
* Returns true if the infinite loop check is OK, false if a loop is detected
*
- * @param $title
- *
+ * @param Title $title
* @return bool
*/
function loopCheck( $title );
}
/**
- * @param $args array
+ * @param array $args
* @return PPCustomFrame_DOM
*/
function newCustomFrame( $args ) {
}
/**
- * @param $values
+ * @param array $values
* @return PPNode_DOM
*/
function newPartNodeArray( $values ) {
* Preprocess some wikitext and return the document tree.
* This is the ghost of Parser::replace_variables().
*
- * @param string $text the text to parse
- * @param $flags Integer: bitwise combination of:
- * Parser::PTD_FOR_INCLUSION Handle "<noinclude>" and "<includeonly>" as if the text is being
- * included. Default is to assume a direct page view.
+ * @param string $text The text to parse
+ * @param int $flags Bitwise combination of:
+ * Parser::PTD_FOR_INCLUSION Handle "<noinclude>" and "<includeonly>" as if the text is being
+ * included. Default is to assume a direct page view.
*
* The generated DOM tree must depend only on the input text and the flags.
* The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
}
/**
- * @param $text string
- * @param $flags int
+ * @param string $text
+ * @param int $flags
* @return string
*/
function preprocessToXml( $text, $flags = 0 ) {
/**
* Construct a new preprocessor frame.
- * @param $preprocessor Preprocessor The parent preprocessor
+ * @param Preprocessor $preprocessor The parent preprocessor
*/
function __construct( $preprocessor ) {
$this->preprocessor = $preprocessor;
* Create a new child frame
* $args is optionally a multi-root PPNode or array containing the template arguments
*
+ * @param bool|array $args
+ * @param Title|bool $title
+ * @param int $indexOffset
* @return PPTemplateFrame_DOM
*/
function newChild( $args = false, $title = false, $indexOffset = 0 ) {
/**
* @throws MWException
- * @param $root
- * @param $flags int
+ * @param string|PPNode_DOM|DOMDocument $root
+ * @param int $flags
* @return string
*/
function expand( $root, $flags = 0 ) {
}
/**
- * @param $sep
- * @param $flags
+ * @param string $sep
+ * @param int $flags
* @return string
*/
function implodeWithFlags( $sep, $flags /*, ... */ ) {
* Implode with no flags specified
* This previously called implodeWithFlags but has now been inlined to reduce stack depth
*
+ * @param string $sep
* @return string
*/
function implode( $sep /*, ... */ ) {
* Makes an object that, when expand()ed, will be the same as one obtained
* with implode()
*
+ * @param string $sep
* @return array
*/
function virtualImplode( $sep /*, ... */ ) {
/**
* Virtual implode with brackets
+ * @param string $start
+ * @param string $sep
+ * @param string $end
* @return array
*/
function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
/**
* Returns true if the infinite loop check is OK, false if a loop is detected
*
+ * @param Title $title
* @return bool
*/
function loopCheck( $title ) {
var $numberedExpansionCache, $namedExpansionCache;
/**
- * @param $preprocessor
- * @param $parent PPFrame_DOM
- * @param $numberedArgs array
- * @param $namedArgs array
- * @param $title Title
+ * @param Preprocessor $preprocessor
+ * @param PPFrame_DOM $parent
+ * @param array $numberedArgs
+ * @param array $namedArgs
+ * @param Title $title
*/
function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
parent::__construct( $preprocessor );
}
/**
- * @param $type
+ * @param string $type
*
* @return bool|PPNode_DOM
*/
}
/**
- * @param $i
+ * @param int $i
* @return bool|PPNode_DOM
*/
function item( $i ) {
}
/**
- * @param $args array
+ * @param array $args
* @return PPCustomFrame_Hash
*/
function newCustomFrame( $args ) {
}
/**
- * @param $values array
+ * @param array $values
* @return PPNode_Hash_Array
*/
function newPartNodeArray( $values ) {
* Preprocess some wikitext and return the document tree.
* This is the ghost of Parser::replace_variables().
*
- * @param string $text the text to parse
- * @param $flags Integer: bitwise combination of:
- * Parser::PTD_FOR_INCLUSION Handle "<noinclude>" and "<includeonly>" as if the text is being
- * included. Default is to assume a direct page view.
+ * @param string $text The text to parse
+ * @param int $flags Bitwise combination of:
+ * Parser::PTD_FOR_INCLUSION Handle "<noinclude>" and "<includeonly>" as if the text is being
+ * included. Default is to assume a direct page view.
*
* The generated DOM tree must depend only on the input text and the flags.
* The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
/**
* Get the accumulator that would result if the close is not found.
*
+ * @param int|bool $openingCount
* @return PPDAccum_Hash
*/
function breakSyntax( $openingCount = false ) {
/**
* Append a string literal
+ * @param string $s
*/
function addLiteral( $s ) {
if ( $this->lastNode === false ) {
/**
* Append a PPNode
+ * @param PPNode $node
*/
function addNode( PPNode $node ) {
if ( $this->lastNode === false ) {
/**
* Append a tree node with text contents
+ * @param string $name
+ * @param string $value
*/
function addNodeWithText( $name, $value ) {
$node = PPNode_Hash_Tree::newWithText( $name, $value );
* 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
*/
function addAccum( $accum ) {
if ( $accum->lastNode === false ) {
/**
* Construct a new preprocessor frame.
- * @param $preprocessor Preprocessor: the parent preprocessor
+ * @param Preprocessor $preprocessor The parent preprocessor
*/
function __construct( $preprocessor ) {
$this->preprocessor = $preprocessor;
* Create a new child frame
* $args is optionally a multi-root PPNode or array containing the template arguments
*
- * @param array|bool|\PPNode_Hash_Array $args PPNode_Hash_Array|array
- * @param $title Title|bool
- *
+ * @param array|bool|PPNode_Hash_Array $args
+ * @param Title|bool $title
* @param int $indexOffset
* @throws MWException
* @return PPTemplateFrame_Hash
/**
* @throws MWException
- * @param $root
- * @param $flags int
+ * @param string|PPNode$root
+ * @param int $flags
* @return string
*/
function expand( $root, $flags = 0 ) {
}
/**
- * @param $sep
- * @param $flags
+ * @param string $sep
+ * @param int $flags
* @return string
*/
function implodeWithFlags( $sep, $flags /*, ... */ ) {
/**
* Implode with no flags specified
* This previously called implodeWithFlags but has now been inlined to reduce stack depth
+ * @param string $sep
* @return string
*/
function implode( $sep /*, ... */ ) {
* Makes an object that, when expand()ed, will be the same as one obtained
* with implode()
*
+ * @param string $sep
* @return PPNode_Hash_Array
*/
function virtualImplode( $sep /*, ... */ ) {
/**
* Virtual implode with brackets
*
+ * @param string $start
+ * @param string $sep
+ * @param string $end
* @return PPNode_Hash_Array
*/
function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
}
/**
- * @param $level bool
- * @return array|bool|String
+ * @param bool $level
+ * @return array|bool|string
*/
function getPDBK( $level = false ) {
if ( $level === false ) {
}
/**
- * @param $name
+ * @param string $name
* @return bool
*/
function getArgument( $name ) {
/**
* Returns true if the infinite loop check is OK, false if a loop is detected
*
- * @param $title Title
+ * @param Title $title
*
* @return bool
*/
var $numberedExpansionCache, $namedExpansionCache;
/**
- * @param $preprocessor
- * @param $parent
- * @param $numberedArgs array
- * @param $namedArgs array
- * @param $title Title
+ * @param Preprocessor $preprocessor
+ * @param bool|PPFrame $parent
+ * @param array $numberedArgs
+ * @param array $namedArgs
+ * @param Title $title
*/
function __construct( $preprocessor, $parent = false, $numberedArgs = array(), $namedArgs = array(), $title = false ) {
parent::__construct( $preprocessor );
}
/**
- * @param $index
+ * @param int $index
* @return array|bool
*/
function getNumberedArgument( $index ) {
}
/**
- * @param $name
+ * @param string $name
* @return bool
*/
function getNamedArgument( $name ) {
}
/**
- * @param $name
+ * @param string $name
* @return array|bool
*/
function getArgument( $name ) {
}
/**
- * @param $index
+ * @param int $index
* @return bool
*/
function getArgument( $index ) {
}
/**
- * @param $name
- * @param $text
+ * @param string $name
+ * @param string $text
* @return PPNode_Hash_Tree
*/
static function newWithText( $name, $text ) {
}
/**
- * @param $i
+ * @param int $i
* @return bool
*/
function item( $i ) {
const UNSTRIP_RECURSION_LIMIT = 20;
/**
- * @param $prefix string
+ * @param string $prefix
*/
function __construct( $prefix ) {
$this->prefix = $prefix;
/**
* Add a nowiki strip item
- * @param $marker
- * @param $value
+ * @param string $marker
+ * @param string $value
*/
function addNoWiki( $marker, $value ) {
$this->addItem( 'nowiki', $marker, $value );
}
/**
- * @param $marker
- * @param $value
+ * @param string $marker
+ * @param string $value
*/
function addGeneral( $marker, $value ) {
$this->addItem( 'general', $marker, $value );
/**
* @throws MWException
- * @param $type
- * @param $marker
- * @param $value
+ * @param string $type
+ * @param string $marker
+ * @param string $value
*/
protected function addItem( $type, $marker, $value ) {
if ( !preg_match( $this->regex, $marker, $m ) ) {
}
/**
- * @param $text
+ * @param string $text
* @return mixed
*/
function unstripGeneral( $text ) {
}
/**
- * @param $text
+ * @param string $text
* @return mixed
*/
function unstripNoWiki( $text ) {
}
/**
- * @param $text
+ * @param string $text
* @return mixed
*/
function unstripBoth( $text ) {
}
/**
- * @param $type
- * @param $text
+ * @param string $type
+ * @param string $text
* @return mixed
*/
protected function unstripType( $type, $text ) {
}
/**
- * @param $m array
+ * @param array $m
* @return array
*/
protected function unstripCallback( $m ) {
* Get a StripState object which is sufficient to unstrip the given text.
* It will contain the minimum subset of strip items necessary.
*
- * @param $text string
+ * @param string $text
*
* @return StripState
*/
* will not be preserved. The strings in the $texts array will have their
* strip markers rewritten, the resulting array of strings will be returned.
*
- * @param $otherState StripState
- * @param $texts Array
- * @return Array
+ * @param StripState $otherState
+ * @param array $texts
+ * @return array
*/
function merge( $otherState, $texts ) {
$mergePrefix = Parser::getRandomString();
}
/**
- * @param $m
+ * @param array $m
* @return string
*/
protected function mergeCallback( $m ) {
/**
* Remove any strip markers found in the given text.
*
- * @param $text Input string
+ * @param string $text Input string
* @return string
*/
function killMarkers( $text ) {
}
/**
- * @param $text string
+ * @param string $text
* @return string
*/
public function getWrapped( $text ) {
}
/**
- * @param $m array
+ * @param array $m
*
* @return string
*/
}
/**
- * @param $text string
+ * @param string $text
* @return string
*/
public function postprocess( $text ) {
* If tidy isn't able to correct the markup, the original will be
* returned in all its glory with a warning comment appended.
*
- * @param string $text hideous HTML input
- * @return String: corrected HTML output
+ * @param string $text Hideous HTML input
+ * @return string Corrected HTML output
*/
public static function tidy( $text ) {
global $wgTidyInternal;
/**
* Check HTML for errors, used if $wgValidateAllHtml = true.
*
- * @param $text String
- * @param &$errorStr String: return the error string
- * @return Boolean: whether the HTML is valid
+ * @param string $text
+ * @param string &$errorStr Return the error string
+ * @return bool Whether the HTML is valid
*/
public static function checkErrors( $text, &$errorStr = null ) {
global $wgTidyInternal;
* Also called in OutputHandler.php for full page validation
*
* @param string $text HTML to check
- * @param $stderr Boolean: Whether to read result from STDERR rather than STDOUT
- * @param &$retval int Exit code (-1 on internal error)
- * @return mixed String or null
+ * @param bool $stderr Whether to read result from STDERR rather than STDOUT
+ * @param int &$retval Exit code (-1 on internal error)
+ * @return string|null
*/
private static function execExternalTidy( $text, $stderr = false, &$retval = null ) {
global $wgTidyConf, $wgTidyBin, $wgTidyOpts;
* saving the overhead of spawning a new process.
*
* @param string $text HTML to check
- * @param $stderr Boolean: Whether to read result from error status instead of output
- * @param &$retval int Exit code (-1 on internal error)
- * @return mixed String or null
+ * @param bool $stderr Whether to read result from error status instead of output
+ * @param int &$retval Exit code (-1 on internal error)
+ * @return string|null
*/
private static function execInternalTidy( $text, $stderr = false, &$retval = null ) {
global $wgTidyConf, $wgDebugTidy;