diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-12 20:57:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 20:57:38 +0200 |
commit | 23771f0587bec99815e76bea3a85c86580c4cf2e (patch) | |
tree | b853a8dae08e0633d360d537b472998d78917307 /apps | |
parent | 9e1d4d17ec792d8abcec2f9262472f5bb7a43acf (diff) | |
parent | fcae6a68c347e2913cc29f45648be37789f09c29 (diff) | |
download | nextcloud-server-23771f0587bec99815e76bea3a85c86580c4cf2e.tar.gz nextcloud-server-23771f0587bec99815e76bea3a85c86580c4cf2e.zip |
Merge pull request #32077 from nextcloud/cleanup/lock
Cleanup lock related code
Diffstat (limited to 'apps')
-rw-r--r-- | apps/testing/lib/Locking/FakeDBLockingProvider.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/apps/testing/lib/Locking/FakeDBLockingProvider.php b/apps/testing/lib/Locking/FakeDBLockingProvider.php index 5f8ea399477..2556ba29a64 100644 --- a/apps/testing/lib/Locking/FakeDBLockingProvider.php +++ b/apps/testing/lib/Locking/FakeDBLockingProvider.php @@ -26,32 +26,27 @@ namespace OCA\Testing\Locking; use OCP\AppFramework\Utility\ITimeFactory; use OCP\IDBConnection; use Psr\Log\LoggerInterface; +use OC\Lock\DBLockingProvider; -class FakeDBLockingProvider extends \OC\Lock\DBLockingProvider { +class FakeDBLockingProvider extends DBLockingProvider { // Lock for 10 hours just to be sure public const TTL = 36000; /** * Need a new child, because parent::connection is private instead of protected... - * @var IDBConnection */ - protected $db; + protected IDBConnection $db; public function __construct( IDBConnection $connection, - LoggerInterface $logger, ITimeFactory $timeFactory ) { - parent::__construct($connection, $logger, $timeFactory); + parent::__construct($connection, $timeFactory); $this->db = $connection; } - - /** - * @param string $path - * @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE - */ - public function releaseLock(string $path, int $type) { + /** @inheritDoc */ + public function releaseLock(string $path, int $type): void { // we DONT keep shared locks till the end of the request if ($type === self::LOCK_SHARED) { $this->db->executeUpdate( |