Clean up get_class() in /includes/filerepo and /includes/resourceloader
[lhc/web/wiklou.git] / includes / filerepo / ForeignDBRepo.php
index 001800f..3e88508 100644 (file)
@@ -51,9 +51,12 @@ class ForeignDBRepo extends LocalRepo {
        /** @var bool */
        protected $hasSharedCache;
 
-       # Other stuff
+       /** @var IDatabase */
        protected $dbConn;
+
+       /** @var callable */
        protected $fileFactory = [ 'ForeignDBFile', 'newFromTitle' ];
+       /** @var callable */
        protected $fileFromRowFactory = [ 'ForeignDBFile', 'newFromRow' ];
 
        /**
@@ -86,7 +89,7 @@ class ForeignDBRepo extends LocalRepo {
        /**
         * @return IDatabase
         */
-       function getSlaveDB() {
+       function getReplicaDB() {
                return $this->getMasterDB();
        }
 
@@ -106,7 +109,7 @@ class ForeignDBRepo extends LocalRepo {
                ];
 
                return function ( $index ) use ( $type, $params ) {
-                       return DatabaseBase::factory( $type, $params );
+                       return Database::factory( $type, $params );
                };
        }
 
@@ -135,7 +138,7 @@ class ForeignDBRepo extends LocalRepo {
        }
 
        protected function assertWritableRepo() {
-               throw new MWException( get_class( $this ) . ': write operations are not supported.' );
+               throw new MWException( static::class . ': write operations are not supported.' );
        }
 
        /**