/** @var string Relative path including trailing slash */
protected $hashPath;
- /** @var string Number of pages of a multipage document, or false for
+ /** @var string|false Number of pages of a multipage document, or false for
* documents which aren't multipage documents
*/
protected $pageCount;
/**
* Get the duration of a media file in seconds
*
- * @return int
+ * @return float|int
*/
public function getLength() {
$handler = $this->getHandler();
*
* @param array $handlerParams
*
- * @return string
+ * @return ThumbnailImage|MediaTransformOutput|bool False on failure
*/
function getUnscaledThumb( $handlerParams = [] ) {
$hp =& $handlerParams;
* Returns the number of pages of a multipage document, or false for
* documents which aren't multipage documents
*
- * @return bool|int
+ * @return string|bool|int
*/
function pageCount() {
if ( !isset( $this->pageCount ) ) {
if ( $srcWidth == 0 ) {
return 0;
} else {
- return round( $srcHeight * $dstWidth / $srcWidth );
+ return (int)round( $srcHeight * $dstWidth / $srcWidth );
}
}
* a good reason. This method skips all caches.
*
* @param string $filePath The path to the file (e.g. From getLocalPathRef() )
- * @return array The width, followed by height, with optionally more things after
+ * @return array|false The width, followed by height, with optionally more things after
*/
function getImageSize( $filePath ) {
if ( !$this->getHandler() ) {
* Get the HTML text of the description page, if available
*
* @param bool|Language $lang Optional language to fetch description in
- * @return string
+ * @return string|false
*/
function getDescriptionText( $lang = false ) {
global $wgLang;
/**
* Get the deletion archive key, "<sha1>.<ext>"
*
- * @return string
+ * @return string|false
*/
function getStorageKey() {
$hash = $this->getSha1();