X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Ffilerepo%2FLocalRepo.php;h=c195241da25c2f609ceda8643d88d0f717d0dd22;hb=25d87429e6085bb055044eed08d1f59b4aa1bc17;hp=21492a52be6b842c311e82a23f76845540e91249;hpb=e09cc5413f81181a1fd8366c23baf148505489fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php index 21492a52be..c195241da2 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -29,28 +29,24 @@ * @ingroup FileRepo */ class LocalRepo extends FileRepo { - /** @var array */ + /** @var callable */ protected $fileFactory = [ 'LocalFile', 'newFromTitle' ]; - - /** @var array */ + /** @var callable */ protected $fileFactoryKey = [ 'LocalFile', 'newFromKey' ]; - - /** @var array */ + /** @var callable */ protected $fileFromRowFactory = [ 'LocalFile', 'newFromRow' ]; - - /** @var array */ + /** @var callable */ protected $oldFileFromRowFactory = [ 'OldLocalFile', 'newFromRow' ]; - - /** @var array */ + /** @var callable */ protected $oldFileFactory = [ 'OldLocalFile', 'newFromTitle' ]; - - /** @var array */ + /** @var callable */ protected $oldFileFactoryKey = [ 'OldLocalFile', 'newFromKey' ]; function __construct( array $info = null ) { parent::__construct( $info ); - $this->hasSha1Storage = isset( $info['storageLayout'] ) && $info['storageLayout'] === 'sha1'; + $this->hasSha1Storage = isset( $info['storageLayout'] ) + && $info['storageLayout'] === 'sha1'; if ( $this->hasSha1Storage() ) { $this->backend = new FileBackendDBRepoWrapper( [ @@ -93,7 +89,7 @@ class LocalRepo extends FileRepo { * * @param array $storageKeys * - * @return FileRepoStatus + * @return Status */ function cleanupDeletedBatch( array $storageKeys ) { if ( $this->hasSha1Storage() ) { @@ -454,7 +450,7 @@ class LocalRepo extends FileRepo { /** * Get a connection to the replica DB - * @return Database + * @return IDatabase */ function getSlaveDB() { return wfGetDB( DB_REPLICA ); @@ -462,7 +458,7 @@ class LocalRepo extends FileRepo { /** * Get a connection to the master DB - * @return Database + * @return IDatabase */ function getMasterDB() { return wfGetDB( DB_MASTER ); @@ -562,7 +558,7 @@ class LocalRepo extends FileRepo { * * @param string $function * @param array $args - * @return FileRepoStatus + * @return Status */ protected function skipWriteOperationIfSha1( $function, array $args ) { $this->assertWritableRepo(); // fail out if read-only