From 46e38a84b8d9b074cf9c3085bc702db79d8d474d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=A3=E8=A8=80=E5=B0=B1=E6=98=AFSiam?= <59419979@qq.com> Date: Tue, 19 Mar 2024 17:04:52 +0800 Subject: [PATCH] Fixed sentry logger handle (#594) * Get sentry current hub * CS Fxied --------- Co-authored-by: hzh --- src/Mutex/RedisServerMutex.php | 2 +- src/Mutex/ServerMutexInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mutex/RedisServerMutex.php b/src/Mutex/RedisServerMutex.php index aa3392d..bce4510 100644 --- a/src/Mutex/RedisServerMutex.php +++ b/src/Mutex/RedisServerMutex.php @@ -56,7 +56,7 @@ public function __construct( $this->retryInterval = (int) ($options['retry_interval'] ?? 10); } - public function attempt(callable $callback = null): void + public function attempt(?callable $callback = null): void { // Waiting for the server mutex. $this->timer->tick($this->retryInterval, function () { diff --git a/src/Mutex/ServerMutexInterface.php b/src/Mutex/ServerMutexInterface.php index 6afe143..208b2e9 100644 --- a/src/Mutex/ServerMutexInterface.php +++ b/src/Mutex/ServerMutexInterface.php @@ -13,7 +13,7 @@ interface ServerMutexInterface { - public function attempt(callable $callback = null); + public function attempt(?callable $callback = null); public function release(bool $force = false); }