/**
* Constructor
- * @param $mainModule ApiMain object
+ * @param ApiMain $mainModule
* @param string $moduleName Name of this module
* @param string $modulePrefix Prefix to use for parameter names
*/
/**
* Get the name of the module as shown in the profiler log
*
- * @param $db DatabaseBase|bool
+ * @param DatabaseBase|bool $db
*
* @return string
*/
/**
* Get the main module
- * @return ApiMain object
+ * @return ApiMain
*/
public function getMain() {
return $this->mMainModule;
* If the module may only be used with a certain format module,
* it should override this method to return an instance of that formatter.
* A value of null means the default format will be used.
- * @return mixed instance of a derived class of ApiFormatBase, or null
+ * @return mixed Instance of a derived class of ApiFormatBase, or null
*/
public function getCustomPrinter() {
return null;
/**
* Generates help message for this module, or false if there is no description
- * @return mixed string or false
+ * @return string|bool
*/
public function makeHelpMsg() {
static $lnPrfx = "\n ";
}
/**
- * @param $item string
+ * @param string $item
* @return string
*/
private function indentExampleText( $item ) {
/**
* @param string $prefix Text to split output items
* @param string $title What is being output
- * @param $input string|array
+ * @param string|array $input
* @return string
*/
protected function makeHelpArrayToString( $prefix, $title, $input ) {
/**
* Generates the parameter descriptions for this module, to be displayed in the
* module's help.
- * @return string or false
+ * @return string|bool
*/
public function makeHelpMsgParameters() {
$params = $this->getFinalParams( ApiBase::GET_VALUES_FOR_HELP );
/**
* Returns the description string for this module
- * @return mixed string or array of strings
+ * @return string|array
*/
protected function getDescription() {
return false;
* tweak it as needed.
*
* @param int $flags Zero or more flags like GET_VALUES_FOR_HELP
- * @return array|Bool False on no parameters
+ * @return array|bool False on no parameters
* @since 1.21 $flags param added
*/
public function getFinalParams( $flags = 0 ) {
/**
* Add token properties to the array used by getResultProperties,
* based on a token functions mapping.
+ * @param array $props
+ * @param array $tokenFunctions
*/
protected static function addTokenProperties( &$props, $tokenFunctions ) {
foreach ( array_keys( $tokenFunctions ) as $token ) {
* value - validated value from user or default. limits will not be
* parsed if $parseLimit is set to false; use this when the max
* limit is not definitive yet, e.g. when getting revisions.
- * @param $parseLimit Boolean: true by default
+ * @param bool $parseLimit True by default
* @return array
*/
public function extractRequestParams( $parseLimit = true ) {
/**
* Get a value for the given parameter
* @param string $paramName Parameter name
- * @param bool $parseLimit see extractRequestParams()
+ * @param bool $parseLimit See extractRequestParams()
* @return mixed Parameter value
*/
protected function getParameter( $paramName, $parseLimit = true ) {
/**
* Die if none or more than one of a certain set of parameters is set and not false.
- * @param array $params of parameter names
+ * @param array $params Array of parameter names
*/
public function requireOnlyOneParameter( $params ) {
$required = func_get_args();
/**
* Generates the possible errors requireOnlyOneParameter() can die with
*
- * @param $params array
+ * @param array $params
* @return array
*/
public function getRequireOnlyOneParameterErrorMessages( $params ) {
/**
* Die if more than one of a certain set of parameters is set and not false.
*
- * @param $params array
+ * @param array $params
*/
public function requireMaxOneParameter( $params ) {
$required = func_get_args();
/**
* Generates the possible error requireMaxOneParameter() can die with
*
- * @param $params array
+ * @param array $params
* @return array
*/
public function getRequireMaxOneParameterErrorMessages( $params ) {
* Generates the possible errors requireAtLeastOneParameter() can die with
*
* @since 1.23
- * @param $params array Array of parameter key names
+ * @param array $params Array of parameter key names
* @return array
*/
public function getRequireAtLeastOneParameterErrorMessages( $params ) {
}
/**
- * @param $params array
+ * @param array $params
* @param bool|string $load Whether load the object's state from the database:
* - false: don't load (if the pageid is given, it will still be loaded)
* - 'fromdb': load from a slave database
/**
* Callback function used in requireOnlyOneParameter to check whether required parameters are set
*
- * @param $x object Parameter to check is not null/false
+ * @param object $x Parameter to check is not null/false
* @return bool
*/
private function parameterNotEmpty( $x ) {
/**
* Return true if we're to watch the page, false if not, null if no change.
* @param string $watchlist Valid values: 'watch', 'unwatch', 'preferences', 'nochange'
- * @param $titleObj Title the page under consideration
+ * @param Title $titleObj The page under consideration
* @param string $userOption The user option to consider when $watchlist=preferences.
* If not set will use watchdefault always and watchcreations if $titleObj doesn't exist.
* @return bool
/**
* Set a watch (or unwatch) based the based on a watchlist parameter.
* @param string $watch Valid values: 'watch', 'unwatch', 'preferences', 'nochange'
- * @param $titleObj Title the article's title to change
+ * @param Title $titleObj The article's title to change
* @param string $userOption The user option to consider when $watch=preferences
*/
protected function setWatch( $watch, $titleObj, $userOption = null ) {
/**
* Using the settings determine the value for the given parameter
*
- * @param string $paramName parameter name
- * @param array|mixed $paramSettings default value or an array of settings
+ * @param string $paramName Parameter name
+ * @param array|mixed $paramSettings Default value or an array of settings
* using PARAM_* constants.
- * @param $parseLimit Boolean: parse limit?
+ * @param bool $parseLimit Parse limit?
* @return mixed Parameter value
*/
protected function getParameterFromSettings( $paramName, $paramSettings, $parseLimit ) {
*
* @param string $valueName The name of the parameter (for error
* reporting)
- * @param $value mixed The value being parsed
+ * @param mixed $value The value being parsed
* @param bool $allowMultiple Can $value contain more than one value
* separated by '|'?
- * @param $allowedValues mixed An array of values to check against. If
+ * @param mixed $allowedValues An array of values to check against. If
* null, all values are accepted.
* @return mixed (allowMultiple ? an_array_of_values : a_single_value)
*/
* @param int|null $min Minimum value
* @param int|null $max Maximum value for users
* @param int $botMax Maximum value for sysops/bots
- * @param $enforceLimits Boolean Whether to enforce (die) if value is outside limits
+ * @param bool $enforceLimits Whether to enforce (die) if value is outside limits
*/
function validateLimit( $paramName, &$value, $min, $max, $botMax = null, $enforceLimits = false ) {
if ( !is_null( $min ) && $value < $min ) {
/**
* Adds a warning to the output, else dies
*
- * @param $msg String Message to show as a warning, or error message if dying
- * @param $enforceLimits Boolean Whether this is an enforce (die)
+ * @param string $msg Message to show as a warning, or error message if dying
+ * @param bool $enforceLimits Whether this is an enforce (die)
*/
private function warnOrDie( $msg, $enforceLimits = false ) {
if ( $enforceLimits ) {
* Get error (as code, string) from a Status object.
*
* @since 1.23
- * @param Status $status Status object
- * @return array of code and error string
+ * @param Status $status
+ * @return array Array of code and error string
*/
public function getErrorFromStatus( $status ) {
if ( $status->isGood() ) {
* Throw a UsageException based on the errors in the Status object.
*
* @since 1.22
- * @param Status $status Status object
+ * @param Status $status
* @throws MWException
*/
public function dieStatus( $status ) {
/**
* Output the error message related to a certain array
- * @param $error (array|string) Element of a getUserPermissionsErrors()-style array
+ * @param array|string $error Element of a getUserPermissionsErrors()-style array
*/
public function dieUsageMsg( $error ) {
# most of the time we send a 1 element, so we might as well send it as
/**
* Will only set a warning instead of failing if the global $wgDebugAPI
* is set to true. Otherwise behaves exactly as dieUsageMsg().
- * @param $error (array|string) Element of a getUserPermissionsErrors()-style array
+ * @param array|string $error Element of a getUserPermissionsErrors()-style array
* @since 1.21
*/
public function dieUsageMsgOrDebug( $error ) {
/**
* Die with the $prefix.'badcontinue' error. This call is common enough to
* make it into the base method.
- * @param $condition boolean will only die if this value is true
+ * @param bool $condition Will only die if this value is true
* @since 1.21
*/
protected function dieContinueUsageIf( $condition ) {
/**
* Gets the user for whom to get the watchlist
*
- * @param $params array
+ * @param array $params
* @return User
*/
public function getWatchlistUser( $params ) {
* Don't call this function directly: use getFinalPossibleErrors() to allow
* hooks to modify parameters as needed.
*
- * @return array in the format of array( key, param1, param2, ... )
+ * @return array Array in the format of array( key, param1, param2, ... )
* or array( 'code' => ..., 'info' => ... )
*/
public function getPossibleErrors() {
/**
* Debugging function that prints a value and an optional backtrace
- * @param $value mixed Value to print
+ * @param mixed $value Value to print
* @param string $name Description of the printed value
* @param bool $backtrace If true, print a backtrace
*/
}
/**
- * @param $revision int
- * @param $titleText string
- * @param $titleId int
+ * @param int $revision
+ * @param string $titleText
+ * @param int $titleId
* @return int
*/
private function revisionOrTitleOrId( $revision, $titleText, $titleId ) {
}
/**
- * @param $title Title
- * @param $user User doing the action
- * @param $token String
+ * @param Title $title
+ * @param User $user User doing the action
+ * @param string $token
* @return array
*/
private static function getPermissionsError( $title, $user, $token ) {
/**
* We have our own delete() function, since Article.php's implementation is split in two phases
*
- * @param $page Page|WikiPage object to work on
- * @param $user User doing the action
+ * @param Page|WikiPage $page Page or WikiPage object to work on
+ * @param User $user User doing the action
* @param string $token delete token (same as edit token)
* @param string|null $reason reason for the deletion. Autogenerated if NULL
* @return Status|array
}
/**
- * @param $revision Revision
+ * @param Revision $revision
* @return string
*/
protected function feedItemAuthor( $revision ) {
}
/**
- * @param $revision Revision
+ * @param Revision $revision
* @return string
*/
protected function feedItemDesc( $revision ) {
}
/**
- * @param $info array
+ * @param array $info
* @return FeedItem
*/
private function createFeedItem( $info ) {
/**
* Checks that the user has permissions to perform this revert.
* Dies with usage message on inadequate permissions.
- * @param $user User The user to check.
+ * @param User $user The user to check.
*/
protected function checkPermissions( $user ) {
$title = $this->file->getTitle();
/**
* Constructor
* If $format ends with 'fm', pretty-print the output in HTML.
- * @param $main ApiMain
+ * @param ApiMain $main
* @param string $format Format name
*/
public function __construct( $main, $format ) {
* The main format printing function. Call it to output the result
* string to the user. This function will automatically output HTML
* when format name ends in 'fm'.
- * @param $text string
+ * @param string $text
*/
public function printText( $text ) {
if ( $this->mDisabled ) {
/**
* Set the flag to buffer the result instead of printing it.
- * @param $value bool
+ * @param bool $value
*/
public function setBufferResult( $value ) {
$this->mBufferResult = $value;
/**
* Sets whether the pretty-printer should format *bold*
- * @param $help bool
+ * @param bool $help
*/
public function setHelp( $help = true ) {
$this->mHelp = $help;
/**
* Pretty-print various elements in HTML format, such as xml tags and
* URLs. This method also escapes characters like <
- * @param $text string
+ * @param string $text
* @return string
*/
protected function formatHTML( $text ) {
/**
* Call this method to initialize output data. See execute()
- * @param $result ApiResult
- * @param $feed object an instance of one of the $wgFeedClasses classes
+ * @param ApiResult $result
+ * @param object $feed An instance of one of the $wgFeedClasses classes
* @param array $feedItems of FeedItem objects
*/
public static function setResult( $result, $feed, $feedItems ) {
/**
* Constructor
- * @param $main ApiMain object
- * @param $errorFallback ApiFormatBase object to fall back on for errors
+ * @param ApiMain $main
+ * @param ApiFormatBase $errorFallback ApiFormatBase object to fall back on for errors
*/
public function __construct( $main, $errorFallback ) {
parent::__construct( $main, 'raw' );
/**
* Recursively go through the object and output its data in WDDX format.
- * @param $elemValue
- * @param $indent int
+ * @param mixed $elemValue
+ * @param int $indent
*/
function slowWddxPrinter( $elemValue, $indent = 0 ) {
$indstr = ( $this->getIsHtml() ? str_repeat( ' ', $indent ) : '' );
* @note The method is recursive, so the same rules apply to any
* sub-arrays.
*
- * @param $elemName
- * @param $elemValue
- * @param $indent
+ * @param string $elemName
+ * @param mixed $elemValue
+ * @param int $indent
*
* @return string
*/
}
/**
- * @param $module ApiBase
- * @param $type String What type of request is this? e.g. action, query, list, prop, meta, format
+ * @param ApiBase $module
+ * @param string $type What type of request is this? e.g. action, query, list, prop, meta, format
* @return string
*/
private function buildModuleHelp( $module, $type ) {
private $mResultArr = array();
/**
- * @param $title Title
- * @param $origTitle Title
- * @param $revisionCount int
- * @param $successCount int
- * @param $pageInfo
+ * @param Title $title
+ * @param Title $origTitle
+ * @param int $revisionCount
+ * @param int $successCount
+ * @param array $pageInfo
* @return void
*/
function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) {
/**
* Constructs an instance of ApiMain that utilizes the module and format specified by $request.
*
- * @param $context IContextSource|WebRequest - if this is an instance of
+ * @param IContextSource|WebRequest $context If this is an instance of
* FauxRequest, errors are thrown and no printing occurs
- * @param bool $enableWrite should be set to true if the api may modify data
+ * @param bool $enableWrite Should be set to true if the api may modify data
*/
public function __construct( $context = null, $enableWrite = false ) {
if ( $context === null ) {
/**
* Set how long the response should be cached.
*
- * @param $maxage
+ * @param int $maxage
*/
public function setCacheMaxAge( $maxage ) {
$this->setCacheControl( array(
* Cache control values set here will only be used if the cache mode is not
* private, see setCacheMode().
*
- * @param $directives array
+ * @param array $directives
*/
public function setCacheControl( $directives ) {
$this->mCacheControl = $directives + $this->mCacheControl;
/**
* Create an instance of an output formatter by its name
*
- * @param $format string
+ * @param string $format
*
* @return ApiFormatBase
*/
/**
* Replace the result data with the information about an exception.
* Returns the error code
- * @param $e Exception
+ * @param Exception $e
* @return string
*/
protected function substituteResultWithError( $e ) {
/**
* Check the max lag if necessary
- * @param $module ApiBase object: Api module being used
- * @param array $params an array containing the request parameters.
- * @return boolean True on success, false should exit immediately
+ * @param ApiBase $module Api module being used
+ * @param array $params Array an array containing the request parameters.
+ * @return bool True on success, false should exit immediately
*/
protected function checkMaxLag( $module, $params ) {
if ( $module->shouldCheckMaxlag() && isset( $params['maxlag'] ) ) {
/**
* Check for sufficient permissions to execute
- * @param $module ApiBase An Api module
+ * @param ApiBase $module An Api module
*/
protected function checkExecutePermissions( $module ) {
$user = $this->getUser();
/**
* Check asserts of the user's rights
- * @param $params array
+ * @param array $params
*/
protected function checkAsserts( $params ) {
if ( isset( $params['assert'] ) ) {
/**
* Check POST for external response and setup result printer
- * @param $module ApiBase An Api module
+ * @param ApiBase $module An Api module
* @param array $params an array with the request parameters
*/
protected function setupExternalResponse( $module, $params ) {
/**
* Encode a value in a format suitable for a space-separated log line.
+ * @param string $s
+ * return string
*/
protected function encodeRequestLogValue( $s ) {
static $table;
/**
* Get the request parameters used in the course of the preceding execute() request
+ * @return array
*/
protected function getParamsUsed() {
return array_keys( $this->mParamsUsed );
/**
* Get a request value, and register the fact that it was used, for logging.
+ * @param string $name
+ * @param mixed $default
+ * @return mixed
*/
public function getVal( $name, $default = null ) {
$this->mParamsUsed[$name] = true;
/**
* Get a boolean request value, and register the fact that the parameter
* was used, for logging.
+ * @param string $name
+ * @return bool
*/
public function getCheck( $name ) {
$this->mParamsUsed[$name] = true;
/**
* Print results using the current printer
*
- * @param $isError bool
+ * @param bool $isError
*/
protected function printResult( $isError ) {
global $wgDebugAPI;
/**
* Sets whether the pretty-printer should format *bold* and $italics$
*
- * @param $help bool
+ * @param bool $help
*/
public function setHelp( $help = true ) {
$this->mPrinter->setHelp( $help );
}
/**
- * @param $module ApiBase
+ * @param ApiBase $module
* @param string $paramName What type of request is this? e.g. action,
* query, list, prop, meta, format
* @return string
*
* @deprecated since 1.21, Use getModuleManager()->addModule() instead.
* @param string $name The identifier for this module.
- * @param $class ApiBase The class where this module is implemented.
+ * @param ApiBase $class The class where this module is implemented.
*/
protected function addModule( $name, $class ) {
$this->getModuleManager()->addModule( $name, 'action', $class );
*
* @deprecated since 1.21, Use getModuleManager()->addModule() instead.
* @param string $name The identifier for this format.
- * @param $class ApiFormatBase The class implementing this format.
+ * @param ApiFormatBase $class The class implementing this format.
*/
protected function addFormat( $name, $class ) {
$this->getModuleManager()->addModule( $name, 'format', $class );
private $mExtraData;
/**
- * @param $message string
- * @param $codestr string
- * @param $code int
- * @param $extradata array|null
+ * @param string $message
+ * @param string $codestr
+ * @param int $code
+ * @param array|null $extradata
*/
public function __construct( $message, $codestr, $code = 0, $extradata = null ) {
parent::__construct( $message, $code );
/**
* Get module instance by name, or instantiate it if it does not exist
- * @param string $moduleName module name
- * @param string $group optionally validate that the module is in a specific group
- * @param bool $ignoreCache if true, force-creates a new instance and does not cache it
- * @return mixed the new module instance, or null if failed
+ * @param string $moduleName Module name
+ * @param string $group Optionally validate that the module is in a specific group
+ * @param bool $ignoreCache If true, force-creates a new instance and does not cache it
+ * @return mixed The new module instance, or null if failed
*/
public function getModule( $moduleName, $group = null, $ignoreCache = false ) {
if ( !isset( $this->mModules[$moduleName] ) ) {
/**
* Get an array of modules in a specific group or all if no group is set.
- * @param string $group optional group filter
- * @return array list of module names
+ * @param string $group Optional group filter
+ * @return array List of module names
*/
public function getNames( $group = null ) {
if ( $group === null ) {
/**
* Create an array of (moduleName => moduleClass) for a specific group or for all.
- * @param string $group name of the group to get or null for all
- * @return array name=>class map
+ * @param string $group Name of the group to get or null for all
+ * @return array Name=>class map
*/
public function getNamesWithClasses( $group = null ) {
$result = array();
/**
* Returns true if the specific module is defined at all or in a specific group.
- * @param string $moduleName module name
- * @param string $group group name to check against, or null to check all groups,
- * @return boolean true if defined
+ * @param string $moduleName Module name
+ * @param string $group Group name to check against, or null to check all groups,
+ * @return bool True if defined
*/
public function isDefined( $moduleName, $group = null ) {
if ( isset( $this->mModules[$moduleName] ) ) {
/**
* Returns the group name for the given module
* @param string $moduleName
- * @return string group name or null if missing
+ * @return string Group name or null if missing
*/
public function getModuleGroup( $moduleName ) {
if ( isset( $this->mModules[$moduleName] ) ) {
/**
* @param Title $fromTitle
* @param Title $toTitle
- * @param $reason
- * @param $noredirect
+ * @param string $reason
+ * @param bool $noredirect
* @return array
*/
public function moveSubpages( $fromTitle, $toTitle, $reason, $noredirect ) {
/**
* Add all items from $values into the result
- * @param array $result output
- * @param array $values values to add
- * @param string $flag the name of the boolean flag to mark this element
- * @param string $name if given, name of the value
+ * @param array $result Output
+ * @param array $values Values to add
+ * @param string $flag The name of the boolean flag to mark this element
+ * @param string $name If given, name of the value
*/
private static function addValues( array &$result, $values, $flag = null, $name = null ) {
foreach ( $values as $val ) {
/**
* Constructor
- * @param $dbSource ApiBase Module implementing getDB().
+ * @param ApiBase $dbSource Module implementing getDB().
* Allows PageSet to reuse existing db connection from the shared state like ApiQuery.
* @param int $flags Zero or more flags like DISABLE_GENERATORS
- * @param int $defaultNamespace the namespace to use if none is specified by a prefix.
+ * @param int $defaultNamespace The namespace to use if none is specified by a prefix.
* @since 1.21 accepts $flags instead of two boolean values
*/
public function __construct( ApiBase $dbSource, $flags = 0, $defaultNamespace = NS_MAIN ) {
* Get the fields that have to be queried from the page table:
* the ones requested through requestField() and a few basic ones
* we always need
- * @return array of field names
+ * @return array Array of field names
*/
public function getPageTableFields() {
// Ensure we get minimum required fields
/**
* Page IDs that were not found in the database
- * @return array of page IDs
+ * @return array Array of page IDs
*/
public function getMissingPageIDs() {
return $this->mMissingPageIDs;
/**
* Get a list of redirect resolutions - maps a title to its redirect
* target.
- * @param $result ApiResult
- * @return array of prefixed_title (string) => Title object
+ * @param ApiResult $result
+ * @return array Array of prefixed_title (string) => Title object
* @since 1.21
*/
public function getRedirectTitlesAsResult( $result = null ) {
/**
* Get a list of title normalizations - maps a title to its normalized
* version.
- * @return array raw_prefixed_title (string) => prefixed_title (string)
+ * @return array Array of raw_prefixed_title (string) => prefixed_title (string)
*/
public function getNormalizedTitles() {
return $this->mNormalizedTitles;
/**
* Get a list of title normalizations - maps a title to its normalized
* version in the form of result array.
- * @param $result ApiResult
- * @return array of raw_prefixed_title (string) => prefixed_title (string)
+ * @param ApiResult $result
+ * @return array Array of raw_prefixed_title (string) => prefixed_title (string)
* @since 1.21
*/
public function getNormalizedTitlesAsResult( $result = null ) {
/**
* Get a list of title conversions - maps a title to its converted
* version.
- * @return array raw_prefixed_title (string) => prefixed_title (string)
+ * @return array Array of raw_prefixed_title (string) => prefixed_title (string)
*/
public function getConvertedTitles() {
return $this->mConvertedTitles;
/**
* Get a list of title conversions - maps a title to its converted
* version as a result array.
- * @param $result ApiResult
- * @return array of (from, to) strings
+ * @param ApiResult $result
+ * @return array Array of (from, to) strings
* @since 1.21
*/
public function getConvertedTitlesAsResult( $result = null ) {
/**
* Get a list of interwiki titles - maps a title to its interwiki
* prefix.
- * @return array raw_prefixed_title (string) => interwiki_prefix (string)
+ * @return array Array of raw_prefixed_title (string) => interwiki_prefix (string)
*/
public function getInterwikiTitles() {
return $this->mInterwikiTitles;
/**
* Get a list of interwiki titles - maps a title to its interwiki
* prefix as result.
- * @param $result ApiResult
- * @param $iwUrl boolean
- * @return array raw_prefixed_title (string) => interwiki_prefix (string)
+ * @param ApiResult $result
+ * @param bool $iwUrl
+ * @return array Array of raw_prefixed_title (string) => interwiki_prefix (string)
* @since 1.21
*/
public function getInterwikiTitlesAsResult( $result = null, $iwUrl = false ) {
/**
* Get an array of invalid/special/missing titles.
*
- * @param $invalidChecks List of types of invalid titles to include.
+ * @param array $invalidChecks List of types of invalid titles to include.
* Recognized values are:
* - invalidTitles: Titles from $this->getInvalidTitles()
* - special: Titles from $this->getSpecialTitles()
/**
* Get the list of revision IDs (requested with the revids= parameter)
- * @return array revID (int) => pageID (int)
+ * @return array Array of revID (int) => pageID (int)
*/
public function getRevisionIDs() {
return $this->mGoodRevIDs;
/**
* Revision IDs that were not found in the database
- * @return array of revision IDs
+ * @return array Array of revision IDs
*/
public function getMissingRevisionIDs() {
return $this->mMissingRevIDs;
/**
* Revision IDs that were not found in the database as result array.
- * @param $result ApiResult
- * @return array of revision IDs
+ * @param ApiResult $result
+ * @return array Array of revision IDs
* @since 1.21
*/
public function getMissingRevisionIDsAsResult( $result = null ) {
/**
* Populate this PageSet from a list of Titles
- * @param array $titles of Title objects
+ * @param array $titles Array of Title objects
*/
public function populateFromTitles( $titles ) {
$this->profileIn();
/**
* Populate this PageSet from a list of page IDs
- * @param array $pageIDs of page IDs
+ * @param array $pageIDs Array of page IDs
*/
public function populateFromPageIDs( $pageIDs ) {
$this->profileIn();
/**
* Populate this PageSet from a rowset returned from the database
- * @param $db DatabaseBase object
- * @param $queryResult ResultWrapper Query result object
+ * @param DatabaseBase $db
+ * @param ResultWrapper $queryResult Query result object
*/
public function populateFromQueryResult( $db, $queryResult ) {
$this->profileIn();
/**
* Populate this PageSet from a list of revision IDs
- * @param array $revIDs of revision IDs
+ * @param array $revIDs Array of revision IDs
*/
public function populateFromRevisionIDs( $revIDs ) {
$this->profileIn();
* #5 Substitute the original LinkBatch object with the new list
* #6 Repeat from step #1
*
- * @param array $titles of Title objects or strings
+ * @param array $titles Array of Title objects or strings
*/
private function initFromTitles( $titles ) {
// Get validated and normalized title objects
/**
* Does the same as initFromTitles(), but is based on page IDs instead
- * @param array $pageids of page IDs
+ * @param array $pageids Array of page IDs
*/
private function initFromPageIds( $pageids ) {
if ( !$pageids ) {
/**
* Iterate through the result of the query on 'page' table,
* and for each row create and store title object and save any extra fields requested.
- * @param $res ResultWrapper DB Query result
- * @param array $remaining of either pageID or ns/title elements (optional).
+ * @param ResultWrapper $res DB Query result
+ * @param array $remaining Array of either pageID or ns/title elements (optional).
* If given, any missing items will go to $mMissingPageIDs and $mMissingTitles
* @param bool $processTitles Must be provided together with $remaining.
* If true, treat $remaining as an array of [ns][title]
/**
* Does the same as initFromTitles(), but is based on revision IDs
* instead
- * @param array $revids of revision IDs
+ * @param array $revids Array of revision IDs
*/
private function initFromRevIDs( $revids ) {
if ( !$revids ) {
* Public caching will only be allowed if *all* the modules that supply
* data for a given request return a cache mode of public.
*
- * @param $params
+ * @param array|null $params
* @return string
* @since 1.21
*/
* This method validates access rights for the title,
* and appends normalization values to the output.
*
- * @param array $titles of Title objects or strings
+ * @param array $titles Array of Title objects or strings
* @return LinkBatch
*/
private function processTitlesArray( $titles ) {
/**
* Returns the input array of integers with all values < 0 removed
*
- * @param $array array
+ * @param array $array
* @return array
*/
private static function getPositiveIntegers( $array ) {
/**
* If the type is requested in parameters, adds a section to res with module info.
- * @param array $params user parameters array
- * @param string $type parameter name
- * @param array $res store results in this array
- * @param ApiResult $resultObj results object to set indexed tag.
+ * @param array $params User parameters array
+ * @param string $type Parameter name
+ * @param array $res Store results in this array
+ * @param ApiResult $resultObj Results object to set indexed tag.
*/
private function addModulesInfo( $params, $type, &$res, $resultObj ) {
if ( !is_array( $params[$type] ) ) {
}
/**
- * @param $obj ApiBase
+ * @param ApiBase $obj
* @return ApiResult
*/
private function getClassInfo( $obj ) {
*/
class ApiParse extends ApiBase {
- /** @var String $section */
+ /** @var string $section */
private $section = null;
/** @var Content $content */
}
/**
- * @param $page WikiPage
- * @param $popts ParserOptions
- * @param $pageId Int
- * @param $getWikitext Bool
+ * @param WikiPage $page
+ * @param ParserOptions $popts
+ * @param int $pageId
+ * @param bool $getWikitext
* @return ParserOutput
*/
private function getParsedContent( WikiPage $page, $popts, $pageId = null, $getWikitext = false ) {
/**
* @deprecated since 1.18 No modern skin generates language links this way,
* please use language links data to generate your own HTML.
- * @param $languages array
+ * @param array $languages
* @return string
*/
private function languagesHtml( $languages ) {
private $mUseLegacyContinue;
/**
- * @param $main ApiMain
- * @param $action string
+ * @param ApiMain $main
+ * @param string $action
*/
public function __construct( $main, $action ) {
parent::__construct( $main, $action );
* Get whether the specified module is a prop, list or a meta query module
* @deprecated since 1.21, use getModuleManager()->getModuleGroup()
* @param string $moduleName Name of the module to find type for
- * @return mixed string or null
+ * @return string|null
*/
function getModuleType( $moduleName ) {
return $this->getModuleManager()->getModuleGroup( $moduleName );
/**
* Parse 'continue' parameter into the list of complete modules and a list of generator parameters
- * @param array|null $pagesetParams returns list of generator params or null if pageset is done
- * @param array|null $completeModules returns list of finished modules (as keys), or null if legacy
+ * @param array|null $pagesetParams Returns list of generator params or null if pageset is done
+ * @param array|null $completeModules Returns list of finished modules (as keys), or null if legacy
*/
private function initContinue( &$pagesetParams, &$completeModules ) {
$pagesetParams = array();
/**
* Validate sub-modules, filter out completed ones, and do requestExtraData()
* @param array $allModules An dict of name=>instance of all modules requested by the client
- * @param array|null $completeModules list of finished modules, or null if legacy continue
+ * @param array|null $completeModules List of finished modules, or null if legacy continue
* @param bool $usePageset True if pageset will be executed
- * @return array of modules to be processed during this execution
+ * @return array Array of modules to be processed during this execution
*/
private function initModules( $allModules, $completeModules, $usePageset ) {
$modules = $allModules;
* The cache mode may increase in the level of privacy, but public modules
* added to private data do not decrease the level of privacy.
*
- * @param $cacheMode string
- * @param $modCacheMode string
+ * @param string $cacheMode
+ * @param string $modCacheMode
* @return string
*/
protected function mergeCacheMode( $cacheMode, $modCacheMode ) {
/**
* Create instances of all modules requested by the client
- * @param array $modules to append instantiated modules to
+ * @param array $modules To append instantiated modules to
* @param string $param Parameter name to read modules from
*/
private function instantiateModules( &$modules, $param ) {
* This method is called by the generator base when generator in the smart-continue
* mode tries to set 'query-continue' value. ApiQuery stores those values separately
* until the post-processing when it is known if the generation should continue or repeat.
- * @param ApiQueryGeneratorBase $module generator module
+ * @param ApiQueryGeneratorBase $module Generator module
* @param string $paramName
* @param mixed $paramValue
- * @return bool true if processed, false if this is a legacy continue
+ * @return bool True if processed, false if this is a legacy continue
*/
public function setGeneratorContinue( $module, $paramName, $paramValue ) {
if ( $this->mUseLegacyContinue ) {
}
/**
- * @param $pageSet ApiPageSet Pages to be exported
- * @param $result ApiResult Result to output to
+ * @param ApiPageSet $pageSet Pages to be exported
+ * @param ApiResult $result Result to output to
*/
private function doExport( $pageSet, $result ) {
$exportTitles = array();
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
*/
private function run( $resultPageSet = null ) {
$db = $this->getDB();
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
public function executeGenerator( $resultPageSet ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
public function executeGenerator( $resultPageSet ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
* This function converts the user name to a canonical form
* which is stored in the database.
* @param string $name
- * @return String
+ * @return string
*/
private function getCanonicalUserName( $name ) {
return str_replace( '_', ' ', $name );
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function prepareFirstQuery( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function prepareSecondQuery( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
private $mQueryModule, $mDb, $tables, $where, $fields, $options, $join_conds;
/**
- * @param $query ApiBase
- * @param $moduleName string
- * @param $paramPrefix string
+ * @param ApiBase $query
+ * @param string $moduleName
+ * @param string $paramPrefix
*/
public function __construct( ApiBase $query, $moduleName, $paramPrefix = '' ) {
parent::__construct( $query->getMain(), $moduleName, $paramPrefix );
* Public caching will only be allowed if *all* the modules that supply
* data for a given request return a cache mode of public.
*
- * @param $params
+ * @param array $params
* @return string
*/
public function getCacheMode( $params ) {
/**
* Add a set of tables to the internal array
- * @param $tables mixed Table name or array of table names
- * @param $alias mixed Table alias, or null for no alias. Cannot be
+ * @param mixed $tables Table name or array of table names
+ * @param mixed $alias Table alias, or null for no alias. Cannot be
* used with multiple tables
*/
protected function addTables( $tables, $alias = null ) {
* conditions) e.g. array('page' => array('LEFT JOIN',
* 'page_id=rev_page')) . conditions may be a string or an
* addWhere()-style array
- * @param $join_conds array JOIN conditions
+ * @param array $join_conds JOIN conditions
*/
protected function addJoinConds( $join_conds ) {
if ( !is_array( $join_conds ) ) {
*
* For example, array('foo=bar', 'baz' => 3, 'bla' => 'foo') translates
* to "foo=bar AND baz='3' AND bla='foo'"
- * @param $value mixed String or array
+ * @param string|array $value
*/
protected function addWhere( $value ) {
if ( is_array( $value ) ) {
/**
* Same as addWhere(), but add the WHERE clauses only if a condition is met
- * @param $value mixed See addWhere()
+ * @param string|array $value
* @param bool $condition If false, do nothing
* @return bool $condition
*/
* Add a WHERE clause corresponding to a range, similar to addWhereRange,
* but converts $start and $end to database timestamps.
* @see addWhereRange
- * @param $field
- * @param $dir
- * @param $start
- * @param $end
- * @param $sort bool
+ * @param string $field
+ * @param string $dir
+ * @param string $start
+ * @param string $end
+ * @param bool $sort
*/
protected function addTimestampWhereRange( $field, $dir, $start, $end, $sort = true ) {
$db = $this->getDb();
/**
* Estimate the row count for the SELECT query that would be run if we
* called select() right now, and check if it's acceptable.
- * @return bool true if acceptable, false otherwise
+ * @return bool True if acceptable, false otherwise
*/
protected function checkRowCount() {
$db = $this->getDB();
* Add information (title and namespace) about a Title object to a
* result array
* @param array $arr Result array à la ApiResult
- * @param $title Title
+ * @param Title $title
* @param string $prefix Module prefix
*/
public static function addTitleInfo( &$arr, $title, $prefix = '' ) {
/**
* Override this method to request extra fields from the pageSet
* using $pageSet->requestField('fieldName')
- * @param $pageSet ApiPageSet
+ * @param ApiPageSet $pageSet
*/
public function requestExtraData( $pageSet ) {
}
* namespace. It is advisable to pass the namespace parameter in order to
* handle per-namespace capitalization settings.
* @param string $titlePart Title part with spaces
- * @param $defaultNamespace int Namespace to assume
+ * @param int $defaultNamespace Namespace to assume
* @return string Title part with underscores
*/
public function titlePartToKey( $titlePart, $defaultNamespace = NS_MAIN ) {
}
/**
- * @param $query String
- * @param $protocol String
+ * @param string $query
+ * @param string $protocol
* @return null|string
*/
public function prepareUrlQuerySearchString( $query = null, $protocol = null ) {
}
/**
- * @param $hash string
+ * @param string $hash
* @return bool
*/
public function validateSha1Hash( $hash ) {
}
/**
- * @param $hash string
+ * @param string $hash
* @return bool
*/
public function validateSha1Base36Hash( $hash ) {
* Switch this module to generator mode. By default, generator mode is
* switched off and the module acts like a normal query module.
* @since 1.21 requires pageset parameter
- * @param $generatorPageSet ApiPageSet object that the module will get
+ * @param ApiPageSet $generatorPageSet ApiPageSet object that the module will get
* by calling getPageSet() when in generator mode.
*/
public function setGeneratorMode( ApiPageSet $generatorPageSet ) {
/**
* Execute this module as a generator
- * @param $resultPageSet ApiPageSet: All output should be appended to
- * this object
+ * @param ApiPageSet $resultPageSet All output should be appended to this object
*/
abstract public function executeGenerator( $resultPageSet );
}
class ApiQueryBlocks extends ApiQueryBase {
/**
- * @var Array
+ * @var array
*/
protected $usernames;
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
*/
private function run( $resultPageSet = null ) {
if ( $this->getPageSet()->getGoodTitleCount() == 0 ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
public function run( $resultPageSet = null ) {
/**
* From parameters, construct a 'scale' array
* @param array $params Parameters passed to api.
- * @return Array or Null: key-val array of 'width' and 'height', or null
+ * @return array|null Key-val array of 'width' and 'height', or null
*/
public function getScale( $params ) {
$p = $this->getModulePrefix();
* We do this later than getScale, since we need the image
* to know which handler, since handlers can make their own parameters.
* @param File $image Image that params are for.
- * @param array $thumbParams thumbnail parameters from getScale
- * @param string $otherParams of otherParams (iiurlparam).
- * @return Array of parameters for transform.
+ * @param array $thumbParams Thumbnail parameters from getScale
+ * @param string $otherParams String of otherParams (iiurlparam).
+ * @return array Array of parameters for transform.
*/
protected function mergeThumbParams( $image, $thumbParams, $otherParams ) {
global $wgThumbLimits;
/**
* Get result information for an image revision
*
- * @param $file File object
- * @param array $prop of properties to get (in the keys)
- * @param $result ApiResult object
- * @param array $thumbParams containing 'width' and 'height' items, or null
+ * @param File $file
+ * @param array $prop Array of properties to get (in the keys)
+ * @param ApiResult $result
+ * @param array $thumbParams Containing 'width' and 'height' items, or null
* @param array|bool|string $opts Options for data fetching.
* This is an array consisting of the keys:
* 'version': The metadata version for the metadata option
* 'language': The language for extmetadata property
* 'multilang': Return all translations in extmetadata property
* 'revdelUser': User to use when checking whether to show revision-deleted fields.
- * @return Array: result array
+ * @return array Result array
*/
static function getInfo( $file, $prop, $result, $thumbParams = null, $opts = false ) {
global $wgContLang;
*
* If this is >= TRANSFORM_LIMIT, you should probably stop processing images.
*
- * @return integer count
+ * @return int count
*/
static function getTransformCount() {
return self::$transformCount;
/**
*
- * @param $metadata Array
- * @param $result ApiResult
- * @return Array
+ * @param array $metadata
+ * @param ApiResult $result
+ * @return array
*/
public static function processMetaData( $metadata, $result ) {
$retval = array();
}
/**
- * @param $img File
+ * @param File $img
* @param null|string $start
* @return string
*/
*
* @param array $filter List of properties to filter out
*
- * @return Array
+ * @return array
*/
public static function getPropertyNames( $filter = array() ) {
return array_diff( array_keys( self::getProperties() ), $filter );
/**
* Return the API documentation for the parameters.
- * @return Array parameter documentation.
+ * @return array Parameter documentation.
*/
public function getParamDescription() {
$p = $this->getModulePrefix();
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
*/
private function run( $resultPageSet = null ) {
if ( $this->getPageSet()->getGoodTitleCount() == 0 ) {
}
/**
- * @param $pageSet ApiPageSet
+ * @param ApiPageSet $pageSet
* @return void
*/
public function requestExtraData( $pageSet ) {
* Get an array mapping token names to their handler functions.
* The prototype for a token function is func($pageid, $title)
* it should return a token or false (permission denied)
- * @return array array(tokenname => function)
+ * @return array Array(tokenname => function)
*/
protected function getTokenFunctions() {
// Don't call the hooks twice
/**
* Get a result array with information about a title
* @param int $pageid Page ID (negative for missing titles)
- * @param $title Title object
+ * @param Title $title
* @return array
*/
private function extractPageInfo( $pageid, $title ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
public function run( $resultPageSet = null ) {
}
/**
- * @param $result ApiResult
- * @param $vals array
- * @param $params string
- * @param $type string
- * @param $action string
- * @param $ts
- * @param $legacy bool
+ * @param ApiResult $result
+ * @param array $vals
+ * @param string $params
+ * @param string $type
+ * @param string $action
+ * @param string $ts
+ * @param bool $legacy
* @return array
*/
public static function addLogParams( $result, &$vals, $params, $type,
* Add page properties to an ApiResult, adding a continue
* parameter if it doesn't fit.
*
- * @param $result ApiResult
- * @param $page int
- * @param $props array
+ * @param ApiResult $result
+ * @param int $page
+ * @param array $props
* @return bool True if it fits in the result
*/
private function addPageProps( $result, $page, $props ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
*/
private function run( $resultPageSet = null ) {
$params = $this->extractRequestParams();
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
*/
public function run( $resultPageSet = null ) {
global $wgQueryCacheLimit;
}
/**
- * @param $randstr
- * @param $limit
- * @param $namespace
- * @param $resultPageSet ApiPageSet
- * @param $redirect
+ * @param string $randstr
+ * @param int $limit
+ * @param int $namespace
+ * @param ApiPageSet $resultPageSet
+ * @param bool $redirect
* @return void
*/
protected function prepareQuery( $randstr, $limit, $namespace, &$resultPageSet, $redirect ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return int
*/
protected function runQuery( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
public function run( $resultPageSet = null ) {
}
/**
- * @param $pageid
- * @param $title
- * @param $rc RecentChange (optional)
+ * @param int $pageid
+ * @param Title $title
+ * @param RecentChange|null $rc
* @return bool|string
*/
public static function getPatrolToken( $pageid, $title, $rc = null ) {
/**
* Generates and outputs the result of this query based upon the provided parameters.
*
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
*/
public function run( $resultPageSet = null ) {
$user = $this->getUser();
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
*/
private function run( ApiPageSet $resultPageSet = null ) {
$db = $this->getDB();
}
/**
- * @param $pageid
- * @param $title Title
- * @param $rev Revision
- * @return bool|String
+ * @param int $pageid
+ * @param Title $title
+ * @param Revision $rev
+ * @return bool|string
*/
public static function getRollbackToken( $pageid, $title, $rev ) {
global $wgUser;
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
/**
* Return the API documentation for the parameters.
- * @return Array parameter documentation.
+ * @return array Parameter documentation.
*/
public function getParamDescription() {
$p = $this->getModulePrefix();
* Validate the 'user' parameter and set the value to compare
* against `revision`.`rev_user_text`
*
- * @param $user string
+ * @param string $user
*/
private function prepareUsername( $user ) {
if ( !is_null( $user ) && $user !== '' ) {
/**
* Extract fields from the database row and append them to a result array
*
- * @param $row
+ * @param mixed $row
* @return array
*/
private function extractRowInfo( $row ) {
* Get an array mapping token names to their handler functions.
* The prototype for a token function is func($user)
* it should return a token or false (permission denied)
- * @return Array tokenname => function
+ * @return array Array of tokenname => function
*/
protected function getTokenFunctions() {
// Don't call the hooks twice
}
/**
- * @param $user User
- * @return String
+ * @param User $user
+ * @return string
*/
public static function getUserrightsToken( $user ) {
global $wgUser;
* Gets all the groups that a user is automatically a member of (implicit groups)
*
* @deprecated since 1.20; call User::getAutomaticGroups() directly.
- * @param $user User
+ * @param User $user
* @return array
*/
public static function getAutoGroups( $user ) {
$fld_loginfo = false;
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
* @return void
*/
private function run( $resultPageSet = null ) {
/**
* Constructor
- * @param $main ApiMain object
+ * @param ApiMain $main
*/
public function __construct( $main ) {
parent::__construct( $main, 'result' );
/**
* Get the 'real' size of a result item. This means the strlen() of the item,
* or the sum of the strlen()s of the elements if the item is an array.
- * @param $value mixed
+ * @param mixed $value
* @return int
*/
public static function size( $value ) {
/**
* Add an output value to the array by name.
* Verifies that value with the same name has not been added before.
- * @param array $arr to add $value to
+ * @param array $arr To add $value to
* @param string $name Index of $arr to add $value at
- * @param $value mixed
+ * @param mixed $value
* @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP.
* This parameter used to be boolean, and the value of OVERRIDE=1 was
* specifically chosen so that it would be backwards compatible with the
/**
* Adds a content element to an array.
* Use this function instead of hardcoding the '*' element.
- * @param array $arr to add the content element to
- * @param $value Mixed
- * @param string $subElemName when present, content element is created
+ * @param array $arr To add the content element to
+ * @param mixed $value
+ * @param string $subElemName When present, content element is created
* as a sub item of $arr. Use this parameter to create elements in
* format "<elem>text</elem>" without attributes.
*/
* In case the array contains indexed values (in addition to named),
* give all indexed values the given tag name. This function MUST be
* called on every array that has numerical indexes.
- * @param $arr array
+ * @param array $arr
* @param string $tag Tag name
*/
public function setIndexedTagName( &$arr, $tag ) {
/**
* Calls setIndexedTagName() on each sub-array of $arr
- * @param $arr array
+ * @param array $arr
* @param string $tag Tag name
*/
public function setIndexedTagName_recursive( &$arr, $tag ) {
* Don't specify a path to a value that's not in the result, or
* you'll get nasty errors.
* @param array $path Path to the array, like addValue()'s $path
- * @param $tag string
+ * @param string $tag
*/
public function setIndexedTagName_internal( $path, $tag ) {
$data = &$this->mData;
* If $path is null, the value will be inserted at the data root.
* If $name is empty, the $value is added as a next list element data[] = $value.
*
- * @param $path array|string|null
- * @param $name string
- * @param $value mixed
+ * @param array|string|null $path
+ * @param string $name
+ * @param mixed $value
* @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. This
* parameter used to be boolean, and the value of OVERRIDE=1 was specifically
* chosen so that it would be backwards compatible with the new method
/**
* Add a parsed limit=max to the result.
*
- * @param $moduleName string
- * @param $limit int
+ * @param string $moduleName
+ * @param int $limit
*/
public function setParsedLimit( $moduleName, $limit ) {
// Add value, allowing overwriting
* Unset a value previously added to the result set.
* Fails silently if the value isn't found.
* For parameters, see addValue()
- * @param $path array|null
- * @param $name string
+ * @param array|null $path
+ * @param string $name
*/
public function unsetValue( $path, $name ) {
$data = &$this->mData;
/**
* Callback function for cleanUpUTF8()
*
- * @param $s string
+ * @param string $s
*/
private static function cleanUp_helper( &$s ) {
if ( !is_string( $s ) ) {
* Stash the file and return the file key
* Also re-raises exceptions with slightly more informative message strings (useful for API)
* @throws MWException
- * @return String file key
+ * @return string File key
*/
private function performStash() {
try {
/**
* Checks that the user has permissions to perform this upload.
* Dies with usage message on inadequate permissions.
- * @param $user User The user to check.
+ * @param User $user The user to check.
*/
protected function checkPermissions( $user ) {
// Check whether the user has the appropriate permissions to upload anyway