diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /includes/filebackend/lockmanager/FSLockManager.php | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'includes/filebackend/lockmanager/FSLockManager.php')
-rw-r--r-- | includes/filebackend/lockmanager/FSLockManager.php | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/includes/filebackend/lockmanager/FSLockManager.php b/includes/filebackend/lockmanager/FSLockManager.php index eacba704..bce6b34c 100644 --- a/includes/filebackend/lockmanager/FSLockManager.php +++ b/includes/filebackend/lockmanager/FSLockManager.php @@ -34,7 +34,7 @@ * @since 1.19 */ class FSLockManager extends LockManager { - /** @var Array Mapping of lock types to the type actually used */ + /** @var array Mapping of lock types to the type actually used */ protected $lockTypeMap = array( self::LOCK_SH => self::LOCK_SH, self::LOCK_UW => self::LOCK_SH, @@ -43,16 +43,14 @@ class FSLockManager extends LockManager { protected $lockDir; // global dir for all servers - /** @var Array Map of (locked key => lock file handle) */ + /** @var array Map of (locked key => lock file handle) */ protected $handles = array(); /** * Construct a new instance from configuration. * - * $config includes: + * @param array $config Includes: * - lockDirectory : Directory containing the lock files - * - * @param array $config */ function __construct( array $config ) { parent::__construct( $config ); @@ -62,8 +60,8 @@ class FSLockManager extends LockManager { /** * @see LockManager::doLock() - * @param $paths array - * @param $type int + * @param array $paths + * @param int $type * @return Status */ protected function doLock( array $paths, $type ) { @@ -77,6 +75,7 @@ class FSLockManager extends LockManager { } else { // Abort and unlock everything $status->merge( $this->doUnlock( $lockedPaths, $type ) ); + return $status; } } @@ -86,8 +85,8 @@ class FSLockManager extends LockManager { /** * @see LockManager::doUnlock() - * @param $paths array - * @param $type int + * @param array $paths + * @param int $type * @return Status */ protected function doUnlock( array $paths, $type ) { @@ -103,8 +102,8 @@ class FSLockManager extends LockManager { /** * Lock a single resource key * - * @param $path string - * @param $type integer + * @param string $path + * @param int $type * @return Status */ protected function doSingleLock( $path, $type ) { @@ -148,8 +147,8 @@ class FSLockManager extends LockManager { /** * Unlock a single resource key * - * @param $path string - * @param $type integer + * @param string $path + * @param int $type * @return Status */ protected function doSingleUnlock( $path, $type ) { @@ -191,8 +190,8 @@ class FSLockManager extends LockManager { } /** - * @param $path string - * @param $handlesToClose array + * @param string $path + * @param array $handlesToClose * @return Status */ private function closeLockHandles( $path, array $handlesToClose ) { @@ -205,11 +204,12 @@ class FSLockManager extends LockManager { $status->warning( 'lockmanager-fail-closelock', $path ); } } + return $status; } /** - * @param $path string + * @param string $path * @return Status */ private function pruneKeyLockFiles( $path ) { @@ -221,12 +221,13 @@ class FSLockManager extends LockManager { } unset( $this->handles[$path] ); } + return $status; } /** * Get the path to the lock file for a key - * @param $path string + * @param string $path * @return string */ protected function getLockPath( $path ) { |