Add missing PHPDoc and properly throw exception

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-02-13 18:03:35 -06:00
parent a422a59f99
commit 7f73ee0764
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
4 changed files with 8 additions and 0 deletions

View File

@ -706,6 +706,7 @@ abstract class Common implements Storage, ILockingStorage {
if ($logger) {
$logger->logException($e);
}
throw $e;
}
}
@ -713,6 +714,7 @@ abstract class Common implements Storage, ILockingStorage {
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function releaseLock($path, $type, ILockingProvider $provider) {
$logger = $this->getLockLogger();
@ -736,6 +738,7 @@ abstract class Common implements Storage, ILockingStorage {
if ($logger) {
$logger->logException($e);
}
throw $e;
}
}
@ -743,6 +746,7 @@ abstract class Common implements Storage, ILockingStorage {
* @param string $path
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function changeLock($path, $type, ILockingProvider $provider) {
$logger = $this->getLockLogger();
@ -766,6 +770,7 @@ abstract class Common implements Storage, ILockingStorage {
if ($logger) {
$logger->logException($e);
}
throw $e;
}
}

View File

@ -107,6 +107,7 @@ interface Storage extends \OCP\Files\Storage {
* @param string $path The path of the file to release the lock for
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
*/
public function releaseLock($path, $type, ILockingProvider $provider);

View File

@ -425,6 +425,7 @@ interface Storage extends IStorage {
* @param string $path The path of the file to acquire the lock for
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
* @since 8.1.0
*/
public function releaseLock($path, $type, ILockingProvider $provider);

View File

@ -46,6 +46,7 @@ interface ILockingStorage {
* @param string $path The path of the file to acquire the lock for
* @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE
* @param \OCP\Lock\ILockingProvider $provider
* @throws \OCP\Lock\LockedException
* @since 9.0.0
*/
public function releaseLock($path, $type, ILockingProvider $provider);