Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/mutex/MySQLMutex.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(\PDO $PDO, string $name, float $timeout = 0)
}

#[\Override]
public function lock(): void
protected function lock(): void
{
$statement = $this->pdo->prepare('SELECT GET_LOCK(?, ?)');

Expand Down Expand Up @@ -62,7 +62,7 @@ public function lock(): void
}

#[\Override]
public function unlock(): void
protected function unlock(): void
{
$statement = $this->pdo->prepare('DO RELEASE_LOCK(?)');
$statement->execute([
Expand Down
4 changes: 2 additions & 2 deletions src/mutex/PgAdvisoryLockMutex.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(\PDO $PDO, string $name)
}

#[\Override]
public function lock(): void
protected function lock(): void
{
$statement = $this->pdo->prepare('SELECT pg_advisory_lock(?, ?)');

Expand All @@ -42,7 +42,7 @@ public function lock(): void
}

#[\Override]
public function unlock(): void
protected function unlock(): void
{
$statement = $this->pdo->prepare('SELECT pg_advisory_unlock(?, ?)');
$statement->execute([
Expand Down
4 changes: 2 additions & 2 deletions tests/mutex/PgAdvisoryLockMutexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function testAcquireLock(): void
)
);

$this->mutex->lock();
\Closure::bind(static fn ($mutex) => $mutex->lock(), null, PgAdvisoryLockMutex::class)($this->mutex);
}

public function testReleaseLock(): void
Expand Down Expand Up @@ -95,6 +95,6 @@ public function testReleaseLock(): void
)
);

$this->mutex->unlock();
\Closure::bind(static fn ($mutex) => $mutex->unlock(), null, PgAdvisoryLockMutex::class)($this->mutex);
}
}
Loading