diff --git a/app/Service/Message/ReceiveHandleService.php b/app/Service/Message/ReceiveHandleService.php index 590f879..ac7de0b 100644 --- a/app/Service/Message/ReceiveHandleService.php +++ b/app/Service/Message/ReceiveHandleService.php @@ -3,13 +3,9 @@ declare(strict_types=1); namespace App\Service\Message; -use App\Cache\LastMessage; -use App\Cache\UnreadTalkCache; use App\Constants\TalkEventConstant; -use App\Constants\TalkMessageType; use App\Constants\TalkModeConstant; use App\Event\TalkEvent; -use App\Model\Talk\TalkRecords; use App\Service\SocketClientService; use App\Service\TalkMessageService; use App\Support\UserRelation; @@ -44,8 +40,8 @@ class ReceiveHandleService * 对话文本消息 * * @param Response|Server $server - * @param Frame $frame - * @param array|string $data 解析后数据 + * @param Frame $frame + * @param array|string $data 解析后数据 * @return void */ public function onTalk($server, Frame $frame, $data) @@ -77,9 +73,9 @@ class ReceiveHandleService * 键盘输入消息 * * @param Response|Server $server - * @param Frame $frame - * @param array|string $data 解析后数据 - * @return false + * @param Frame $frame + * @param array|string $data 解析后数据 + * @return void */ public function onKeyboard($server, Frame $frame, $data) { diff --git a/app/Service/SocketClientService.php b/app/Service/SocketClientService.php index 9489ea7..3680806 100644 --- a/app/Service/SocketClientService.php +++ b/app/Service/SocketClientService.php @@ -82,7 +82,7 @@ class SocketClientService * @param string $run_id 服务运行ID(默认当前服务ID) * @return array */ - public function findUserFds(int $user_id, $run_id = SERVER_RUN_ID) + public function findUserFds(int $user_id, $run_id = SERVER_RUN_ID): array { return SocketUserBindFds::getInstance()->findFds($user_id, $run_id); } diff --git a/app/Traits/StaticInstance.php b/app/Traits/StaticInstance.php index c9fd0e3..71fc89b 100644 --- a/app/Traits/StaticInstance.php +++ b/app/Traits/StaticInstance.php @@ -20,7 +20,7 @@ trait StaticInstance * * @return static */ - static public function getInstance() + public static function getInstance() { if (is_null(static::$instance)) { static::$instance = new static();