add phpdoc

This commit is contained in:
Robin Appelman 2015-10-20 16:09:04 +02:00 committed by Thomas Müller
parent cc7bd53d17
commit f39c73c79c
2 changed files with 13 additions and 0 deletions

View File

@ -33,6 +33,13 @@ abstract class AbstractLockingProvider implements ILockingProvider {
'exclusive' => []
];
/**
* Check if we've locally acquired a lock
*
* @param string $path
* @param int $type
* @return bool
*/
protected function hasAcquiredLock($path, $type) {
if ($type === self::LOCK_SHARED) {
return isset($this->acquiredLocks['shared'][$path]) && $this->acquiredLocks['shared'][$path] > 0;

View File

@ -51,6 +51,12 @@ class DBLockingProvider extends AbstractLockingProvider {
const TTL = 3600; // how long until we clear stray locks in seconds
/**
* Check if we have an open shared lock for a path
*
* @param string $path
* @return bool
*/
protected function isLocallyLocked($path) {
return isset($this->sharedLocks[$path]) && $this->sharedLocks[$path];
}