From: Aaron Schulz Date: Fri, 28 Jun 2019 23:55:54 +0000 (-0700) Subject: lockmanager: disable internal QuorumLockManager methods that should never be reached X-Git-Tag: 1.34.0-rc.0~1193^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=97792e85e1dce666dee37ee52a18d895247b1653;p=lhc%2Fweb%2Fwiklou.git lockmanager: disable internal QuorumLockManager methods that should never be reached Change-Id: If19f48f8c2d3fe8a38068b09d8691bc8f4eb5d46 --- diff --git a/includes/libs/lockmanager/QuorumLockManager.php b/includes/libs/lockmanager/QuorumLockManager.php index 1ef4642a84..950b283670 100644 --- a/includes/libs/lockmanager/QuorumLockManager.php +++ b/includes/libs/lockmanager/QuorumLockManager.php @@ -35,15 +35,7 @@ abstract class QuorumLockManager extends LockManager { /** @var array Map of degraded buckets */ protected $degradedBuckets = []; // (bucket index => UNIX timestamp) - final protected function doLock( array $paths, $type ) { - return $this->doLockByType( [ $type => $paths ] ); - } - - final protected function doUnlock( array $paths, $type ) { - return $this->doUnlockByType( [ $type => $paths ] ); - } - - protected function doLockByType( array $pathsByType ) { + final protected function doLockByType( array $pathsByType ) { $status = StatusValue::newGood(); $pathsToLock = []; // (bucket => type => paths) @@ -278,4 +270,12 @@ abstract class QuorumLockManager extends LockManager { * @return StatusValue */ abstract protected function releaseAllLocks(); + + final protected function doLock( array $paths, $type ) { + throw new LogicException( __METHOD__ . ': proxy class does not need this method.' ); + } + + final protected function doUnlock( array $paths, $type ) { + throw new LogicException( __METHOD__ . ': proxy class does not need this method.' ); + } }