From cb4bc115a92e56ca008e1c0edd08bda0a331c8ba Mon Sep 17 00:00:00 2001 From: LIU JIAN Date: Wed, 15 Apr 2020 10:47:41 +0800 Subject: [PATCH] Update php_generator.cc Add type annotations to make the IDE more friendly --- src/compiler/php_generator.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/php_generator.cc b/src/compiler/php_generator.cc index ca084cccbdf..ddeb2bc7a96 100644 --- a/src/compiler/php_generator.cc +++ b/src/compiler/php_generator.cc @@ -80,7 +80,8 @@ void PrintMethod(const MethodDescriptor* method, Printer* out) { if (method->client_streaming()) { out->Print(vars, " * @param array $$metadata metadata\n" - " * @param array $$options call options\n */\n" + " * @param array $$options call options\n" + " * @return \\$output_type_id$\n */\n" "public function $name$($$metadata = [], " "$$options = []) {\n"); out->Indent(); @@ -98,7 +99,8 @@ void PrintMethod(const MethodDescriptor* method, Printer* out) { out->Print(vars, " * @param \\$input_type_id$ $$argument input argument\n" " * @param array $$metadata metadata\n" - " * @param array $$options call options\n */\n" + " * @param array $$options call options\n" + " * @return \\$output_type_id$\n */\n" "public function $name$(\\$input_type_id$ $$argument,\n" " $$metadata = [], $$options = []) {\n"); out->Indent();