* Filters an array returned by makeLikeArray(), removing everything past first pattern placeholder.
*
* @param $arr array: array to filter
- * @return filtered array
+ * @return array filtered array
*/
public static function keepOneWildcard( $arr ) {
if( !is_array( $arr ) ) {
* @param $index
* @param $method
*
- * @return true
+ * @return bool
*/
private static function isMethodValidFor( $index, $method ) {
if ( $index < NS_MAIN ) {
$wgUser = RequestContext::getMain()->getUser(); # BackCompat
/**
- * @var Language
+ * @var $wgLang Language
*/
$wgLang = new StubUserLang;
$wgOut = RequestContext::getMain()->getOutput(); # BackCompat
/**
- * @var Parser
+ * @var $wgParser Parser
*/
$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
* Open a socket if there isn't one open already, return it.
* Returns false on error.
*
- * @return false|resource
+ * @return bool|resource
*/
protected function getSocket() {
if ( $this->socket !== null ) {
* (c) sends Content-Length header based on HTTP_IF_MODIFIED_SINCE check
*
* @param $path string Storage path or file system path
- * @param $info Array|false File stat info with 'mtime' and 'size' fields
+ * @param $info Array|bool File stat info with 'mtime' and 'size' fields
* @param $headers Array Additional headers to send
* @param $sendErrors bool Send error messages if errors occur (like 404)
- * @return int|false READY_STREAM, NOT_MODIFIED, or false on failure
+ * @return int|bool READY_STREAM, NOT_MODIFIED, or false on failure
*/
public static function prepareForStream(
$path, $info, $headers = array(), $sendErrors = true
$name = $this->getPrefixedText();
$dbName = $this->getPrefixedDBKey();
- // Check with and without underscores
+ // Check for explicit whitelisting with and without underscores
if ( in_array( $name, $wgWhitelistRead, true ) || in_array( $dbName, $wgWhitelistRead, true ) ) {
- # Check for explicit whitelisting
$whitelisted = true;
} elseif ( $this->getNamespace() == NS_MAIN ) {
# Old settings might have the title prefixed with
*
* @note Call saveSettings() after calling this function to commit the change.
*
- * @return true
+ * @return bool
*/
public function confirmEmail() {
$this->setEmailAuthenticationTimestamp( wfTimestampNow() );
* address if it was already confirmed.
*
* @note Call saveSettings() after calling this function to commit the change.
- * @return true
+ * @return bool
*/
function invalidateEmail() {
$this->load();
* Add an autocreate newuser log entry for this user
* Used by things like CentralAuth and perhaps other authplugins.
*
- * @return true
+ * @return bool
*/
public function addNewUserLogEntryAutoCreate() {
global $wgNewUserLog;
*
* @todo We can give more info than just the wiki id!
* @param $wikiID String: wiki'd id (generally database name)
- * @return Wiki's name or $wiki_id if the wiki was not found
+ * @return string|int Wiki's name or $wiki_id if the wiki was not found
*/
public static function getWikiName( $wikiID ) {
$wiki = WikiMap::getWiki( $wikiID );
*
* If the a variable is unset in $_SERVER, it should be unset in $vars.
*
- * @param $vars A subset of $_SERVER.
- * @param $extWhitelist Extensions which are allowed, assumed harmless.
+ * @param $vars array A subset of $_SERVER.
+ * @param $extWhitelist array Extensions which are allowed, assumed harmless.
* @return bool
*/
public static function areServerVarsBad( $vars, $extWhitelist = array() ) {
*
* @param $dstPath The location of the suspect file
* @param $retval Return value of some shell process, file will be deleted if this is non-zero
- * @return true if removed, false otherwise
+ * @return bool if removed, false otherwise
*/
function removeBadFile( $dstPath, $retval = 0 ) {
if( file_exists( $dstPath ) ) {
* @param $srcWidth Integer: width of the source image
* @param $srcHeight Integer: height of the source image
* @param $mimeType Unused
- * @return false to indicate that an error should be returned to the user.
+ * @return bool to indicate that an error should be returned to the user.
*/
function validateThumbParams( &$width, &$height, $srcWidth, $srcHeight, $mimeType ) {
$width = intval( $width );
}
/**
- * @return string|false The permanent thumbnail storage path
+ * @return string|bool The permanent thumbnail storage path
*/
public function getStoragePath() {
return $this->storagePath;
* Get the path of a file system copy of the thumbnail.
* Callers should never write to this path.
*
- * @return string|false Returns false if there isn't one
+ * @return string|bool Returns false if there isn't one
*/
public function getLocalCopyPath() {
if ( $this->isError() ) {
* @param $url String: URL path to the thumb
* @param $width Integer: file's width
* @param $height Integer: file's height
- * @param $path String|false|null: filesystem path to the thumb
+ * @param $path String|bool|null: filesystem path to the thumb
* @param $page Integer: page number, for multipage files
* @private
*/
* @param string $dstPath
* @param string $width
* @param string $height
- * @return true|MediaTransformError
+ * @return bool|MediaTransformError
*/
public function rasterize( $srcPath, $dstPath, $width, $height ) {
global $wgSVGConverters, $wgSVGConverter, $wgSVGConverterPath;
* @author Hashar
*
* @param $filename String Full path to a XCF file
- * @return false|metadata array just like PHP getimagesize()
+ * @return bool|array metadata array just like PHP getimagesize()
*/
static function getXCFMetaData( $filename ) {
# Decode master structure
* regularly during long-running operations with the percentage progress
* as the first parameter.
*
- * @return true on success, false if unimplemented
+ * @return bool on success, false if unimplemented
*/
public function deleteObjectsExpiringBefore( $date, $progressCallback = false ) {
// stub
* Please read the documentation in includes/parser/Preprocessor.php for more information
* about the methods available in PPFrame and PPNode.
*
- * @return The old callback function for this name, if any
+ * @return string|callback The old callback function for this name, if any
*/
public function setFunctionHook( $id, $callback, $flags = 0 ) {
global $wgContLang;
*
* @param $title Title
* @param $options String
- * @param $holders LinkHolderArray|false
+ * @param $holders LinkHolderArray|bool
* @return string HTML
*/
function makeImage( $title, $options, $holders = false ) {
* Retrieve the ParserOutput from ParserCache, even if it's outdated.
* @param $article Article
* @param $popts ParserOptions
- * @return ParserOutput|false
+ * @return ParserOutput|bool
*/
public function getDirty( $article, $popts ) {
$value = $this->get( $article, $popts, true );
* @param $popts ParserOptions
* @param $useOutdated
*
- * @return ParserOutput|false
+ * @return ParserOutput|bool
*/
public function get( $article, $popts, $useOutdated = false ) {
global $wgCacheEpoch;
* Set the visibility for the revisions in this list. Logging and
* transactions are done here.
*
- * @param $params Associative array of parameters. Members are:
+ * @param $params array Associative array of parameters. Members are:
* value: The integer value to set the visibility to
* comment: The log comment.
* @return Status
/**
* Record a log entry on the action
- * @param $params Associative array of parameters:
+ * @param $params array Associative array of parameters:
* newBits: The new value of the *_deleted bitfield
* oldBits: The old value of the *_deleted bitfield.
* title: The target title
* @param $name String username
* @param $userId Int user id
* @param $op String operator '|' or '&'
- * @param $dbw null|Database, if you happen to have one lying around
+ * @param $dbw null|DatabaseBase, if you happen to have one lying around
* @return bool
*/
private static function setUsernameBitfields( $name, $userId, $op, $dbw ) {
public static function unsuppressUserName( $name, $userId, $dbw = null ) {
return self::setUsernameBitfields( $name, $userId, '&', $dbw );
}
-}
\ No newline at end of file
+}
/**
* LEFT JOIN is expensive
*
- * @return true
+ * @return bool
*/
function isExpensive() {
return true;
}
/**
- * @return false
+ * @return bool
*/
function sortDescending() {
return false;