diff --git a/src/Components/grpc/example/ApiServer/Controller/IndexController.php b/src/Components/grpc/example/ApiServer/Controller/IndexController.php index 9962afce35d19d54f1e9682372b9bb82705067db..87a1ebf34881ae1d0eb3775071f85cd7a86338c3 100644 --- a/src/Components/grpc/example/ApiServer/Controller/IndexController.php +++ b/src/Components/grpc/example/ApiServer/Controller/IndexController.php @@ -48,13 +48,8 @@ class IndexController extends HttpController * 测试登录. * * @Action - * - * @param string $phone - * @param string $password - * - * @return mixed */ - public function testLogin($phone, $password) + public function testLogin(string $phone, string $password): array { $request = new LoginRequest(); $request->setPhone($phone); @@ -76,11 +71,9 @@ class IndexController extends HttpController /** * @Action * - * @param array|object $phone - * - * @return mixed + * @param array|object $data */ - public function test($data) + public function test($data): array { $request = ProtobufUtil::newMessage(TestRequest::class, $data); // @phpstan-ignore-next-line