diff --git a/docs/en/websocket-server.md b/docs/en/websocket-server.md index 4b196b460..4dff3e0e9 100644 --- a/docs/en/websocket-server.md +++ b/docs/en/websocket-server.md @@ -62,17 +62,17 @@ use Swoole\Websocket\Frame; class WebSocketController implements OnMessageInterface, OnOpenInterface, OnCloseInterface { - public function onMessage(Server $server, Frame $frame): void + public function onMessage($server, Frame $frame): void { $server->push($frame->fd, 'Recv: ' . $frame->data); } - public function onClose(Server $server, int $fd, int $reactorId): void + public function onClose($server, int $fd, int $reactorId): void { var_dump('closed'); } - public function onOpen(Server $server, Request $request): void + public function onOpen($server, Request $request): void { $server->push($request->fd, 'Opened'); } diff --git a/docs/zh-cn/websocket-server.md b/docs/zh-cn/websocket-server.md index c9fae75d2..67eee37f3 100644 --- a/docs/zh-cn/websocket-server.md +++ b/docs/zh-cn/websocket-server.md @@ -63,17 +63,17 @@ use Swoole\WebSocket\Server as WebSocketServer; class WebSocketController implements OnMessageInterface, OnOpenInterface, OnCloseInterface { - public function onMessage(WebSocketServer $server, Frame $frame): void + public function onMessage($server, Frame $frame): void { $server->push($frame->fd, 'Recv: ' . $frame->data); } - public function onClose(Server $server, int $fd, int $reactorId): void + public function onClose($server, int $fd, int $reactorId): void { var_dump('closed'); } - public function onOpen(WebSocketServer $server, Request $request): void + public function onOpen($server, Request $request): void { $server->push($request->fd, 'Opened'); } @@ -109,12 +109,12 @@ use Swoole\WebSocket\Server as WebSocketServer; class WebSocketController implements OnMessageInterface, OnOpenInterface { - public function onMessage(WebSocketServer $server, Frame $frame): void + public function onMessage($server, Frame $frame): void { $server->push($frame->fd, 'Username: ' . Context::get('username')); } - public function onOpen(WebSocketServer $server, Request $request): void + public function onOpen($server, Request $request): void { Context::set('username', $request->cookie['username']); } diff --git a/docs/zh-hk/websocket-server.md b/docs/zh-hk/websocket-server.md index b8f33ad57..981bcf223 100644 --- a/docs/zh-hk/websocket-server.md +++ b/docs/zh-hk/websocket-server.md @@ -63,17 +63,17 @@ use Swoole\WebSocket\Server as WebSocketServer; class WebSocketController implements OnMessageInterface, OnOpenInterface, OnCloseInterface { - public function onMessage(WebSocketServer $server, Frame $frame): void + public function onMessage($server, Frame $frame): void { $server->push($frame->fd, 'Recv: ' . $frame->data); } - public function onClose(Server $server, int $fd, int $reactorId): void + public function onClose($server, int $fd, int $reactorId): void { var_dump('closed'); } - public function onOpen(WebSocketServer $server, Request $request): void + public function onOpen($server, Request $request): void { $server->push($request->fd, 'Opened'); } @@ -109,12 +109,12 @@ use Swoole\WebSocket\Server as WebSocketServer; class WebSocketController implements OnMessageInterface, OnOpenInterface { - public function onMessage(WebSocketServer $server, Frame $frame): void + public function onMessage($server, Frame $frame): void { $server->push($frame->fd, 'Username: ' . Context::get('username')); } - public function onOpen(WebSocketServer $server, Request $request): void + public function onOpen($server, Request $request): void { Context::set('username', $request->cookie['username']); } diff --git a/docs/zh-tw/websocket-server.md b/docs/zh-tw/websocket-server.md index 1852244bc..396d7f2eb 100644 --- a/docs/zh-tw/websocket-server.md +++ b/docs/zh-tw/websocket-server.md @@ -63,17 +63,17 @@ use Swoole\WebSocket\Server as WebSocketServer; class WebSocketController implements OnMessageInterface, OnOpenInterface, OnCloseInterface { - public function onMessage(WebSocketServer $server, Frame $frame): void + public function onMessage($server, Frame $frame): void { $server->push($frame->fd, 'Recv: ' . $frame->data); } - public function onClose(Server $server, int $fd, int $reactorId): void + public function onClose($server, int $fd, int $reactorId): void { var_dump('closed'); } - public function onOpen(WebSocketServer $server, Request $request): void + public function onOpen($server, Request $request): void { $server->push($request->fd, 'Opened'); } @@ -109,12 +109,12 @@ use Swoole\WebSocket\Server as WebSocketServer; class WebSocketController implements OnMessageInterface, OnOpenInterface { - public function onMessage(WebSocketServer $server, Frame $frame): void + public function onMessage($server, Frame $frame): void { $server->push($frame->fd, 'Username: ' . Context::get('username')); } - public function onOpen(WebSocketServer $server, Request $request): void + public function onOpen($server, Request $request): void { Context::set('username', $request->cookie['username']); }