selenium: wdio-mocha-framework now v0.6.4
[lhc/web/wiklou.git] / includes / filerepo / LocalRepo.php
index f5b83ae..76043d5 100644 (file)
@@ -34,17 +34,17 @@ use Wikimedia\Rdbms\IDatabase;
  */
 class LocalRepo extends FileRepo {
        /** @var callable */
-       protected $fileFactory = [ 'LocalFile', 'newFromTitle' ];
+       protected $fileFactory = [ LocalFile::class, 'newFromTitle' ];
        /** @var callable */
-       protected $fileFactoryKey = [ 'LocalFile', 'newFromKey' ];
+       protected $fileFactoryKey = [ LocalFile::class, 'newFromKey' ];
        /** @var callable */
-       protected $fileFromRowFactory = [ 'LocalFile', 'newFromRow' ];
+       protected $fileFromRowFactory = [ LocalFile::class, 'newFromRow' ];
        /** @var callable */
-       protected $oldFileFromRowFactory = [ 'OldLocalFile', 'newFromRow' ];
+       protected $oldFileFromRowFactory = [ OldLocalFile::class, 'newFromRow' ];
        /** @var callable */
-       protected $oldFileFactory = [ 'OldLocalFile', 'newFromTitle' ];
+       protected $oldFileFactory = [ OldLocalFile::class, 'newFromTitle' ];
        /** @var callable */
-       protected $oldFileFactoryKey = [ 'OldLocalFile', 'newFromKey' ];
+       protected $oldFileFactoryKey = [ OldLocalFile::class, 'newFromKey' ];
 
        function __construct( array $info = null ) {
                parent::__construct( $info );
@@ -91,7 +91,7 @@ class LocalRepo extends FileRepo {
         * interleave database locks with file operations, which is potentially a
         * remote operation.
         *
-        * @param array $storageKeys
+        * @param string[] $storageKeys
         *
         * @return Status
         */
@@ -371,7 +371,7 @@ class LocalRepo extends FileRepo {
         * SHA-1 content hash.
         *
         * @param string $hash A sha1 hash to look for
-        * @return File[]
+        * @return LocalFile[]
         */
        function findBySha1( $hash ) {
                $dbr = $this->getReplicaDB();
@@ -400,8 +400,8 @@ class LocalRepo extends FileRepo {
         *
         * Overrides generic implementation in FileRepo for performance reason
         *
-        * @param array $hashes An array of hashes
-        * @return array An Array of arrays or iterators of file objects and the hash as key
+        * @param string[] $hashes An array of hashes
+        * @return array[] An Array of arrays or iterators of file objects and the hash as key
         */
        function findBySha1s( array $hashes ) {
                if ( !count( $hashes ) ) {
@@ -434,7 +434,7 @@ class LocalRepo extends FileRepo {
         *
         * @param string $prefix The prefix to search for
         * @param int $limit The maximum amount of files to return
-        * @return array
+        * @return LocalFile[]
         */
        public function findFilesByPrefix( $prefix, $limit ) {
                $selectOptions = [ 'ORDER BY' => 'img_name', 'LIMIT' => intval( $limit ) ];