* Factory function.
*
* @param $title Title for the category page
- * @return category|false on a totally invalid name
+ * @return Category|bool on a totally invalid name
*/
public static function newFromTitle( $title ) {
$cat = new self();
public function getFileCount() { return $this->getX( 'mFiles' ); }
/**
- * @return Title|false Title for this category, or false on failure.
+ * @return Title|bool Title for this category, or false on failure.
*/
public function getTitle() {
if ( $this->mTitle ) return $this->mTitle;
*
* @param $url String: The URL of the text to get
* @param $params Array: associative array of parameters for the ExternalStore object.
- * @return The text stored or false on error
+ * @return string|bool The text stored or false on error
*/
static function fetchFromURL( $url, $params = array() ) {
global $wgExternalStores;
* @param $url
* @param $data
* @param $params array
- * @return string|false The URL of the stored data item, or false on error
+ * @return string|bool The URL of the stored data item, or false on error
*/
static function insert( $url, $data, $params = array() ) {
list( $proto, $params ) = explode( '://', $url, 2 );
* This is a wrapper around newFromId().
*
* @param $user User
- * @return ExternalUser|false
+ * @return ExternalUser|bool
*/
public static function newFromUser( $user ) {
global $wgExternalAuthType;
/**
* Form action URL. false means we will use the URL to set Title
* @since 1.19
- * @var false|string
+ * @var bool|string
*/
protected $mAction = false;
/**
* Returns usage examples for this module. Return false if no examples are available.
- * @return false|string|array
+ * @return bool|string|array
*/
protected function getExamples() {
return false;
}
/**
- * @return false|string|array Returns a false if the module has no help url, else returns a (array of) string
+ * @return bool|string|array Returns a false if the module has no help url, else returns a (array of) string
*/
public function getHelpUrls() {
return false;
* @param $name string Name to assign to the database connection
* @param $db int One of the DB_* constants
* @param $groups array Query groups
- * @return Database
+ * @return DatabaseBase
*/
public function getNamedDB( $name, $db, $groups ) {
if ( !array_key_exists( $name, $this->mNamedDB ) ) {
/**
* Get the last-modified timestamp of the cache file
- * @return string|false TS_MW timestamp
+ * @return string|bool TS_MW timestamp
*/
public function cacheTimestamp() {
$timestamp = filemtime( $this->cachePath() );
*
* @param $hash String: the hash of contents, to check validity.
* @param $code Mixed: Optional language code, see documenation of load().
- * @return false on failure.
+ * @return bool on failure.
*/
function loadFromLocal( $hash, $code ) {
global $wgCacheDirectory, $wgLocalMessageCacheSerialized;
* @param $cache Array: cached messages with a version.
* @param $memc Bool: Wether to update or not memcache.
* @param $code String: Language code.
- * @return False on somekind of error.
+ * @return bool on somekind of error.
*/
protected function saveToCaches( $cache, $memc = true, $code = false ) {
wfProfileIn( __METHOD__ );
* @param $fname string The function name of the caller.
* @param $options string|array The query options. See DatabaseBase::select() for details.
*
- * @return false|mixed The value from the field, or false on failure.
+ * @return bool|mixed The value from the field, or false on failure.
*/
function selectField( $table, $var, $cond = '', $fname = 'DatabaseBase::selectField',
$options = array() )
/**
* Construct and initialize a wrapper for DB2 query results
- * @param $db Database
+ * @param $db DatabaseBase
* @param $result Object
* @param $num_rows Integer
* @param $sql String
* @param $table string
* @param $index string
* @param $fname string
- * @return false|array
+ * @return bool|array
*/
function indexInfo( $table, $index, $fname = 'DatabaseMysql::indexInfo' ) {
# SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not.
*
* @param $fileName string
*
- * @return PDO|false SQL connection or false if failed
+ * @return PDO|bool SQL connection or false if failed
*/
function openFile( $fileName ) {
$this->mDatabaseFile = $fileName;
/**
* Check if the searchindext table is FTS enabled.
- * @return false if not enabled.
+ * @return bool if not enabled.
*/
function checkForEnabledSearch() {
if ( self::$fulltextEnabled === null ) {
/**
* Get the file size in bytes
*
- * @return int|false
+ * @return int|bool
*/
public function getSize() {
return filesize( $this->path );
/**
* Get the file's last-modified timestamp
*
- * @return string|false TS_MW timestamp or false on failure
+ * @return string|bool TS_MW timestamp or false on failure
*/
public function getTimestamp() {
wfSuppressWarnings();
* 160 log 2 / log 36 = 30.95, so the 160-bit hash fills 31 digits in base 36
* fairly neatly.
*
- * @return false|string False on failure
+ * @return bool|string False on failure
*/
public function getSha1Base36() {
wfProfileIn( __METHOD__ );
*
* @param $path string
*
- * @return false|string False on failure
+ * @return bool|string False on failure
*/
public static function getSha1Base36FromPath( $path ) {
$fsFile = new self( $path );
/**
* Get an explanatory message if this backend is read-only
*
- * @return string|false Returns falls if the backend is not read-only
+ * @return string|bool Returns falls if the backend is not read-only
*/
final public function getReadOnlyReason() {
return ( $this->readOnly != '' ) ? $this->readOnly : false;
* @param $action string
* @param $type string
* @param $values Array
- * @return string|false
+ * @return string|bool
*/
protected function sendCommand( $lockSrv, $action, $type, $values ) {
$conn = $this->getConnection( $lockSrv );
/**
* Loads a file object from the filearchive table
- * @return true on success or null
+ * @return bool on success or null
*/
public function load() {
if ( $this->dataLoaded ) {
*/
/**
- * @var FileRepo|false
+ * @var FileRepo|bool
*/
var $repo;
/**
- * @var Title|false
+ * @var Title|bool
*/
var $title;
var $lastError, $redirected, $redirectedTitle;
/**
- * @var FSFile|false
+ * @var FSFile|bool
*/
protected $fsFile;
* may return false or throw exceptions if they are not set.
* Most subclasses will want to call assertRepoDefined() here.
*
- * @param $title Title|string|false
- * @param $repo FileRepo|false
+ * @param $title Title|string|bool
+ * @param $repo FileRepo|bool
*/
function __construct( $title, $repo ) {
if ( $title !== false ) { // subclasses may not use MW titles
* valid Title object with namespace NS_FILE or null
*
* @param $title Title|string
- * @param $exception string|false Use 'exception' to throw an error on bad titles
+ * @param $exception string|bool Use 'exception' to throw an error on bad titles
* @return Title|null
*/
static function normalizeTitle( $title, $exception = false ) {
*
* @param $page int
*
- * @return false|number
+ * @return bool|number
*/
public function getHeight( $page = 1 ) {
return false;
*
* @param $reason String
* @param $suppress Boolean: hide content from sysops?
- * @return true on success, false on some kind of failure
+ * @return bool on success, false on some kind of failure
* STUB
* Overridden by LocalFile
*/
* Returns the number of pages of a multipage document, or false for
* documents which aren't multipage documents
*
- * @return false|int
+ * @return bool|int
*/
function pageCount() {
if ( !isset( $this->pageCount ) ) {
*
* @param $path string
*
- * @return false|string False on failure
+ * @return bool|string False on failure
*/
static function sha1Base36( $path ) {
wfDeprecated( __METHOD__, '1.19' );
* A FileRepo object is not required here, unlike most other File classes.
*
* @throws MWException
- * @param $title Title|false
+ * @param $title Title|bool
* @param $repo FileRepo
* @param $path string
* @param $mime string
public abstract function getName();
/**
- * @return true if the client library is compiled in.
+ * @return bool Returns true if the client library is compiled in.
*/
public abstract function isCompiled();
*
* @param $title Title
*
- * @return false if the specified title is not a redirect, or if it is a circular redirect
+ * @return bool if the specified title is not a redirect, or if it is a circular redirect
*/
public static function getFinalDestination( $title ) {
$dbw = wfGetDB( DB_MASTER );