Merge "Remove useless $out parameter from SkinTemplate::prepareQuickTemplate()"
[lhc/web/wiklou.git] / includes / filerepo / file / UnregisteredLocalFile.php
index e7fa46e..5a3e4e9 100644 (file)
  *
  * Read-only.
  *
- * TODO: Currently it doesn't really work in the repository role, there are
+ * @todo Currently it doesn't really work in the repository role, there are
  * lots of functions missing. It is used by the WebStore extension in the
  * standalone role.
  *
  * @ingroup FileAbstraction
  */
 class UnregisteredLocalFile extends File {
-       var $title, $path, $mime, $dims, $metadata;
+       /** @var Title */
+       protected $title;
 
-       /**
-        * @var MediaHandler
-        */
-       var $handler;
+       /** @var string */
+       protected $path;
+
+       /** @var bool|string */
+       protected $mime;
+
+       /** @var array Dimension data */
+       protected $dims;
+
+       /** @var bool|string Handler-specific metadata which will be saved in the img_metadata field */
+       protected $metadata;
+
+       /** @var MediaHandler */
+       public $handler;
 
        /**
         * @param string $path Storage path
-        * @param $mime string
+        * @param string $mime
         * @return UnregisteredLocalFile
         */
        static function newFromPath( $path, $mime ) {
@@ -51,8 +62,8 @@ class UnregisteredLocalFile extends File {
        }
 
        /**
-        * @param $title
-        * @param $repo
+        * @param Title $title
+        * @param FileRepo $repo
         * @return UnregisteredLocalFile
         */
        static function newFromTitle( $title, $repo ) {
@@ -64,10 +75,10 @@ class UnregisteredLocalFile extends File {
         * A FileRepo object is not required here, unlike most other File classes.
         *
         * @throws MWException
-        * @param $title Title|bool
-        * @param $repo FileRepo|bool
-        * @param $path string|bool
-        * @param $mime string|bool
+        * @param Title|bool $title
+        * @param FileRepo|bool $repo
+        * @param string|bool $path
+        * @param string|bool $mime
         */
        function __construct( $title = false, $repo = false, $path = false, $mime = false ) {
                if ( !( $title && $repo ) && !$path ) {
@@ -96,7 +107,7 @@ class UnregisteredLocalFile extends File {
        }
 
        /**
-        * @param $page int
+        * @param int $page
         * @return bool
         */
        private function cachePageDimensions( $page = 1 ) {
@@ -111,8 +122,8 @@ class UnregisteredLocalFile extends File {
        }
 
        /**
-        * @param $page int
-        * @return number
+        * @param int $page
+        * @return int
         */
        function getWidth( $page = 1 ) {
                $dim = $this->cachePageDimensions( $page );
@@ -121,8 +132,8 @@ class UnregisteredLocalFile extends File {
        }
 
        /**
-        * @param $page int
-        * @return number
+        * @param int $page
+        * @return int
         */
        function getHeight( $page = 1 ) {
                $dim = $this->cachePageDimensions( $page );
@@ -143,8 +154,8 @@ class UnregisteredLocalFile extends File {
        }
 
        /**
-        * @param $filename String
-        * @return Array|bool
+        * @param string $filename
+        * @return array|bool
         */
        function getImageSize( $filename ) {
                if ( !$this->getHandler() ) {
@@ -195,7 +206,7 @@ class UnregisteredLocalFile extends File {
         * The file at the path of $fsFile should not be deleted (or at least
         * not until the end of the request). This is mostly a performance hack.
         *
-        * @param $fsFile FSFile
+        * @param FSFile $fsFile
         * @return void
         */
        public function setLocalReference( FSFile $fsFile ) {