Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-05-12 21:57:38 +0300
committerGitHub <noreply@github.com>2022-05-12 21:57:38 +0300
commit23771f0587bec99815e76bea3a85c86580c4cf2e (patch)
treeb853a8dae08e0633d360d537b472998d78917307 /apps
parent9e1d4d17ec792d8abcec2f9262472f5bb7a43acf (diff)
parentfcae6a68c347e2913cc29f45648be37789f09c29 (diff)
Merge pull request #32077 from nextcloud/cleanup/lock
Cleanup lock related code
Diffstat (limited to 'apps')
-rw-r--r--apps/testing/lib/Locking/FakeDBLockingProvider.php17
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(