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
diff options
context:
space:
mode:
Diffstat (limited to 'apps/testing/lib/Locking/FakeDBLockingProvider.php')
-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(