From f211ae16cb3075b5977c52d7fd8f4896a8c51dc7 Mon Sep 17 00:00:00 2001 From: Demin Yin Date: Fri, 8 Dec 2023 16:11:36 -0800 Subject: [PATCH] remove return value from method \Swoole\Server\Admin::start() --- src/core/Server/Admin.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/Server/Admin.php b/src/core/Server/Admin.php index 5f23579..183d9b2 100644 --- a/src/core/Server/Admin.php +++ b/src/core/Server/Admin.php @@ -391,11 +391,12 @@ public static function getAccessToken(): string return self::$accessToken; } - public static function start(Server $server) + public static function start(Server $server): void { $admin_server_uri = swoole_string($server->setting['admin_server']); if ($admin_server_uri->startsWith('unix:/')) { - return swoole_error_log(SWOOLE_LOG_ERROR, "admin_server[{$server->setting['admin_server']}] is not supported"); + swoole_error_log(SWOOLE_LOG_ERROR, "admin_server[{$server->setting['admin_server']}] is not supported"); + return; } if ($admin_server_uri->contains('@')) { @@ -424,7 +425,8 @@ public static function start(Server $server) $method = $req->getMethod(); if ($method === 'OPTIONS') { - return $resp->end(); + $resp->end(); + return; } $token = self::getAccessToken();