/**
* @param int $page
- * @return int|number
+ * @return int
*/
public function getWidth( $page = 1 ) {
return isset( $this->mInfo['width'] ) ? intval( $this->mInfo['width'] ) : 0;
* null on error
*/
public function getExtendedMetadata() {
- if ( isset( $this->mInfo['extmetadata'] ) ) {
- return $this->mInfo['extmetadata'];
- }
-
- return null;
+ return $this->mInfo['extmetadata'] ?? null;
}
/**
* @return null|string
*/
function getThumbPath( $suffix = '' ) {
- if ( $this->repo->canCacheThumbs() ) {
- $path = $this->repo->getZonePath( 'thumb' ) . '/' . $this->getHashPath();
- if ( $suffix ) {
- $path .= $suffix . '/';
- }
-
- return $path;
- } else {
+ if ( !$this->repo->canCacheThumbs() ) {
return null;
}
+
+ $path = $this->repo->getZonePath( 'thumb' ) . '/' . $this->getHashPath();
+ if ( $suffix ) {
+ $path .= $suffix . '/';
+ }
+ return $path;
}
/**