From e5638f88eaf0ef9bf0f726cdf7498a237ca38277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Sat, 23 Mar 2024 19:28:51 +0800 Subject: [PATCH] Format code by the latest `cs-fixer`. (#6617) --- src/Annotation/Signal.php | 1 + src/ConfigProvider.php | 1 + src/Handler/CoroutineServerStopHandler.php | 1 + src/Handler/WorkerStopHandler.php | 1 + src/Listener/SignalDeregisterListener.php | 1 + src/Listener/SignalRegisterListener.php | 1 + src/SignalHandlerInterface.php | 1 + src/SignalManager.php | 3 ++- tests/SignalManagerTest.php | 1 + tests/Stub/SignalHandler2Stub.php | 1 + tests/Stub/SignalHandlerStub.php | 1 + 11 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Annotation/Signal.php b/src/Annotation/Signal.php index f3d7b38..b40cf95 100644 --- a/src/Annotation/Signal.php +++ b/src/Annotation/Signal.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Signal\Annotation; use Attribute; diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 05d9186..02ab300 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Signal; use Hyperf\Signal\Listener\SignalDeregisterListener; diff --git a/src/Handler/CoroutineServerStopHandler.php b/src/Handler/CoroutineServerStopHandler.php index 5601861..4485d9a 100644 --- a/src/Handler/CoroutineServerStopHandler.php +++ b/src/Handler/CoroutineServerStopHandler.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Signal\Handler; use Hyperf\Contract\ConfigInterface; diff --git a/src/Handler/WorkerStopHandler.php b/src/Handler/WorkerStopHandler.php index fad31f9..7f19f1e 100644 --- a/src/Handler/WorkerStopHandler.php +++ b/src/Handler/WorkerStopHandler.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Signal\Handler; use Hyperf\Contract\ConfigInterface; diff --git a/src/Listener/SignalDeregisterListener.php b/src/Listener/SignalDeregisterListener.php index b3a87a9..c369bb2 100644 --- a/src/Listener/SignalDeregisterListener.php +++ b/src/Listener/SignalDeregisterListener.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Signal\Listener; use Hyperf\Event\Contract\ListenerInterface; diff --git a/src/Listener/SignalRegisterListener.php b/src/Listener/SignalRegisterListener.php index 202ae8d..39132d2 100644 --- a/src/Listener/SignalRegisterListener.php +++ b/src/Listener/SignalRegisterListener.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Signal\Listener; use Hyperf\Event\Contract\ListenerInterface; diff --git a/src/SignalHandlerInterface.php b/src/SignalHandlerInterface.php index ca6cc00..44c429d 100644 --- a/src/SignalHandlerInterface.php +++ b/src/SignalHandlerInterface.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Signal; interface SignalHandlerInterface diff --git a/src/SignalManager.php b/src/SignalManager.php index 8a7e693..e6bcf85 100644 --- a/src/SignalManager.php +++ b/src/SignalManager.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Signal; use Hyperf\Contract\ConfigInterface; @@ -39,7 +40,7 @@ public function __construct(protected ContainerInterface $container) public function init() { foreach ($this->getQueue() as $class) { - /** @var SignalHandlerInterface $handler */ + /** @var SignalHandler $handler */ $handler = $this->container->get($class); foreach ($handler->listen() as [$process, $signal]) { if ($process & SignalHandler::WORKER) { diff --git a/tests/SignalManagerTest.php b/tests/SignalManagerTest.php index 17669ab..32db1a3 100644 --- a/tests/SignalManagerTest.php +++ b/tests/SignalManagerTest.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Signal; use Hyperf\Config\Config; diff --git a/tests/Stub/SignalHandler2Stub.php b/tests/Stub/SignalHandler2Stub.php index 9bb3bd5..ce54727 100644 --- a/tests/Stub/SignalHandler2Stub.php +++ b/tests/Stub/SignalHandler2Stub.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Signal\Stub; use Hyperf\Context\Context; diff --git a/tests/Stub/SignalHandlerStub.php b/tests/Stub/SignalHandlerStub.php index 12c52e0..fffb04f 100644 --- a/tests/Stub/SignalHandlerStub.php +++ b/tests/Stub/SignalHandlerStub.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Signal\Stub; use Hyperf\Context\Context;