aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filerepo/file/File.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/filerepo/file/File.php')
-rw-r--r--includes/filerepo/file/File.php68
1 files changed, 34 insertions, 34 deletions
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 793b8967de44..513a934151ef 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -110,10 +110,10 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* The following member variables are not lazy-initialised
*/
- /** @var FileRepo|LocalRepo|ForeignAPIRepo|bool */
+ /** @var FileRepo|LocalRepo|ForeignAPIRepo|false */
public $repo;
- /** @var Title|string|bool */
+ /** @var Title|string|false */
protected $title;
/** @var string Text of last error */
@@ -125,7 +125,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
/** @var Title */
protected $redirectedTitle;
- /** @var FSFile|bool False if undefined */
+ /** @var FSFile|false False if undefined */
protected $fsFile;
/** @var MediaHandler */
@@ -182,8 +182,8 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Most subclasses will want to call assertRepoDefined() here.
*
* @stable to call
- * @param Title|string|bool $title
- * @param FileRepo|bool $repo
+ * @param Title|string|false $title
+ * @param FileRepo|false $repo
*/
public function __construct( $title, $repo ) {
// Some subclasses do not use $title, but set name/title some other way
@@ -199,7 +199,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* valid Title object with namespace NS_FILE or null
*
* @param PageIdentity|LinkTarget|string $title
- * @param string|bool $exception Use 'exception' to throw an error on bad titles
+ * @param string|false $exception Use 'exception' to throw an error on bad titles
* @throws MWException
* @return Title|null
*/
@@ -456,7 +456,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* returns false.
*
* @stable to override
- * @return string|bool ForeignAPIFile::getPath can return false
+ * @return string|false ForeignAPIFile::getPath can return false
*/
public function getPath() {
if ( !isset( $this->path ) ) {
@@ -472,7 +472,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Returns false on failure. Callers must not alter the file.
* Temporary files are cleared automatically.
*
- * @return string|bool False on failure
+ * @return string|false False on failure
*/
public function getLocalRefPath() {
$this->assertRepoDefined();
@@ -503,7 +503,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
*
* @stable to override
* @param int $page
- * @return int|bool
+ * @return int|false
*/
public function getWidth( $page = 1 ) {
return false;
@@ -518,7 +518,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
*
* @stable to override
* @param int $page
- * @return bool|int False on failure
+ * @return int|false False on failure
*/
public function getHeight( $page = 1 ) {
return false;
@@ -531,7 +531,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
*
* @param int $desiredWidth
* @param int $page
- * @return bool|int
+ * @return int|false
*/
public function getThumbnailBucket( $desiredWidth, $page = 1 ) {
$thumbnailBuckets = MediaWikiServices::getInstance()
@@ -1049,7 +1049,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
*
* @param array $handlerParams
*
- * @return ThumbnailImage|MediaTransformOutput|bool False on failure
+ * @return ThumbnailImage|MediaTransformOutput|false False on failure
*/
public function getUnscaledThumb( $handlerParams = [] ) {
$hp =& $handlerParams;
@@ -1172,7 +1172,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* @param array $params An associative array of handler-specific parameters.
* Typical keys are width, height and page.
* @param int $flags A bitfield, may contain self::RENDER_NOW to force rendering
- * @return ThumbnailImage|MediaTransformOutput|bool False on failure
+ * @return ThumbnailImage|MediaTransformOutput|false False on failure
*/
public function transform( $params, $flags = 0 ) {
$thumbnailEpoch = MediaWikiServices::getInstance()->getMainConfig()
@@ -1275,7 +1275,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* @param TempFSFile $tmpFile Temporary file where the rendered thumbnail will be saved
* @param array $transformParams
* @param int $flags
- * @return bool|MediaTransformOutput
+ * @return MediaTransformOutput|false
*/
public function generateAndSaveThumb( $tmpFile, $transformParams, $flags ) {
$ignoreImageErrors = MediaWikiServices::getInstance()->getMainConfig()
@@ -1538,7 +1538,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
/**
* Get a MediaHandler instance for this file
*
- * @return MediaHandler|bool Registered MediaHandler for file's MIME type
+ * @return MediaHandler|false Registered MediaHandler for file's MIME type
* or false if none found
*/
public function getHandler() {
@@ -1709,7 +1709,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the path of an archived file relative to the public zone root
* @stable to override
*
- * @param bool|string $suffix If not false, the name of an archived thumbnail file
+ * @param string|false $suffix If not false, the name of an archived thumbnail file
*
* @return string
*/
@@ -1729,7 +1729,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* thumbnail directory or a particular file if $suffix is specified
* @stable to override
*
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string
*/
public function getThumbRel( $suffix = false ) {
@@ -1757,7 +1757,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* or a specific thumb if the $suffix is given.
*
* @param string $archiveName The timestamped name of an archived image
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string
*/
private function getArchiveThumbRel( $archiveName, $suffix = false ) {
@@ -1772,7 +1772,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
/**
* Get the path of the archived file.
*
- * @param bool|string $suffix If not false, the name of an archived file.
+ * @param string|false $suffix If not false, the name of an archived file.
* @return string
*/
public function getArchivePath( $suffix = false ) {
@@ -1785,7 +1785,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the path of an archived file's thumbs, or a particular thumb if $suffix is specified
*
* @param string $archiveName The timestamped name of an archived image
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string
*/
public function getArchiveThumbPath( $archiveName, $suffix = false ) {
@@ -1799,7 +1799,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the path of the thumbnail directory, or a particular file if $suffix is specified
* @stable to override
*
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string
*/
public function getThumbPath( $suffix = false ) {
@@ -1811,7 +1811,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
/**
* Get the path of the transcoded directory, or a particular file if $suffix is specified
*
- * @param bool|string $suffix If not false, the name of a media file
+ * @param string|false $suffix If not false, the name of a media file
* @return string
*/
public function getTranscodedPath( $suffix = false ) {
@@ -1824,7 +1824,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the URL of the archive directory, or a particular file if $suffix is specified
* @stable to override
*
- * @param bool|string $suffix If not false, the name of an archived file
+ * @param string|false $suffix If not false, the name of an archived file
* @return string
*/
public function getArchiveUrl( $suffix = false ) {
@@ -1845,7 +1845,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* @stable to override
*
* @param string $archiveName The timestamped name of an archived image
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string
*/
public function getArchiveThumbUrl( $archiveName, $suffix = false ) {
@@ -1864,7 +1864,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the URL of the zone directory, or a particular file if $suffix is specified
*
* @param string $zone Name of requested zone
- * @param bool|string $suffix If not false, the name of a file in zone
+ * @param string|false $suffix If not false, the name of a file in zone
* @return string Path
*/
private function getZoneUrl( $zone, $suffix = false ) {
@@ -1882,7 +1882,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the URL of the thumbnail directory, or a particular file if $suffix is specified
* @stable to override
*
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string Path
*/
public function getThumbUrl( $suffix = false ) {
@@ -1908,7 +1908,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
/**
* Get the URL of the transcoded directory, or a particular file if $suffix is specified
*
- * @param bool|string $suffix If not false, the name of a media file
+ * @param string|false $suffix If not false, the name of a media file
* @return string Path
*/
public function getTranscodedUrl( $suffix = false ) {
@@ -1919,7 +1919,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the public zone virtual URL for a current version source file
* @stable to override
*
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string
*/
public function getVirtualUrl( $suffix = false ) {
@@ -1936,7 +1936,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the public zone virtual URL for an archived version source file
* @stable to override
*
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string
*/
public function getArchiveVirtualUrl( $suffix = false ) {
@@ -1955,7 +1955,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the virtual URL for a thumbnail file or directory
* @stable to override
*
- * @param bool|string $suffix If not false, the name of a thumbnail file
+ * @param string|false $suffix If not false, the name of a thumbnail file
* @return string
*/
public function getThumbVirtualUrl( $suffix = false ) {
@@ -2045,7 +2045,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Returns the repository
* @stable to override
*
- * @return FileRepo|bool
+ * @return FileRepo|false
*/
public function getRepo() {
return $this->repo;
@@ -2206,7 +2206,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* unknown or not applicable.
*
* @stable to override
- * @return string|bool
+ * @return string|false
*/
public function getDescriptionUrl() {
if ( $this->repo ) {
@@ -2302,7 +2302,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* Get the 14-character timestamp of the file upload
*
* @stable to override
- * @return string|bool TS_MW timestamp or false on failure
+ * @return string|false TS_MW timestamp or false on failure
*/
public function getTimestamp() {
$this->assertRepoDefined();
@@ -2316,7 +2316,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
* would be expensive.
* @since 1.25
* @stable to override
- * @return string|bool
+ * @return string|false
*/
public function getDescriptionTouched() {
return false;