From b26d5074fce39fef08eb8d4c0113918caa67fe60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 17 Aug 2023 17:03:04 +0800 Subject: [PATCH] qqq --- Task/Task.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Task/Task.php b/Task/Task.php index 386d17b..f77e633 100644 --- a/Task/Task.php +++ b/Task/Task.php @@ -10,7 +10,7 @@ use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use ReflectionException; use Swoole\Server; - +use Kiri\Di\Inject\Container; /** * @@ -21,19 +21,10 @@ class Task implements TaskInterface /** * @var ServerInterface */ + #[Container(ServerInterface::class)] public ServerInterface $server; - /** - * @return void - * @throws ReflectionException - */ - public function init(): void - { - $this->server = Kiri::getDi()->get(ServerInterface::class); - } - - /** * @param Server $server * @return void