From efbc9e7b9f3dfae946061e0c5fef9d98635be99f Mon Sep 17 00:00:00 2001
From: thinkerou <thinkerou@gmail.com>
Date: Tue, 16 Aug 2016 20:00:36 +0800
Subject: [PATCH] update func desc

---
 src/php/ext/grpc/call.c                | 13 +++++++------
 src/php/ext/grpc/call_credentials.c    |  6 +++---
 src/php/ext/grpc/channel.c             |  8 ++++----
 src/php/ext/grpc/channel_credentials.c | 16 ++++++++--------
 src/php/ext/grpc/server.c              |  6 +++---
 src/php/ext/grpc/timeval.c             | 18 +++++++++---------
 6 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c
index c74a569723..3a49ea8708 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -199,7 +199,7 @@ zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned TSRMLS_DC) {
  *                             Must not be closed.
  * @param string $method The method to call
  * @param Timeval $deadline_obj The deadline for completing the call
- * @param string $host_override The host is set by user. (optional)
+ * @param string $host_override The host is set by user (optional)
  */
 PHP_METHOD(Call, __construct) {
   zval *channel_obj;
@@ -238,7 +238,7 @@ PHP_METHOD(Call, __construct) {
 
 /**
  * Start a batch of RPC actions.
- * @param array batch Array of actions to take
+ * @param array $array Array of actions to take
  * @return object Object with results of all actions
  */
 PHP_METHOD(Call, startBatch) {
@@ -516,8 +516,9 @@ PHP_METHOD(Call, getPeer) {
 }
 
 /**
- * Cancel the call. This will cause the call to end with STATUS_CANCELLED if
- * it has not already ended with another status.
+ * Cancel the call. This will cause the call to end with STATUS_CANCELLED
+ * if it has not already ended with another status.
+ * @return void
  */
 PHP_METHOD(Call, cancel) {
   wrapped_grpc_call *call = Z_WRAPPED_GRPC_CALL_P(getThis());
@@ -526,8 +527,8 @@ PHP_METHOD(Call, cancel) {
 
 /**
  * Set the CallCredentials for this call.
- * @param CallCredentials creds_obj The CallCredentials object
- * @param int The error code
+ * @param CallCredentials $creds_obj The CallCredentials object
+ * @return int The error code
  */
 PHP_METHOD(Call, setCredentials) {
   zval *creds_obj;
diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c
index 25c92c91fe..3aafc3a19b 100644
--- a/src/php/ext/grpc/call_credentials.c
+++ b/src/php/ext/grpc/call_credentials.c
@@ -87,8 +87,8 @@ zval *grpc_php_wrap_call_credentials(grpc_call_credentials
 
 /**
  * Create composite credentials from two existing credentials.
- * @param CallCredentials cred1 The first credential
- * @param CallCredentials cred2 The second credential
+ * @param CallCredentials $cred1_obj The first credential
+ * @param CallCredentials $cred2_obj The second credential
  * @return CallCredentials The new composite credentials object
  */
 PHP_METHOD(CallCredentials, createComposite) {
@@ -119,7 +119,7 @@ PHP_METHOD(CallCredentials, createComposite) {
 
 /**
  * Create a call credentials object from the plugin API
- * @param function callback The callback function
+ * @param function $fci The callback function
  * @return CallCredentials The new call credentials object
  */
 PHP_METHOD(CallCredentials, createFromPlugin) {
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
index 1ca79698da..4ce4f307b0 100644
--- a/src/php/ext/grpc/channel.c
+++ b/src/php/ext/grpc/channel.c
@@ -125,7 +125,7 @@ void php_grpc_read_args_array(zval *args_array,
  * "credentials" key mapping to a ChannelCredentials object, a secure channel
  * will be created with those credentials.
  * @param string $target The hostname to associate with this channel
- * @param array $args The arguments to pass to the Channel
+ * @param array $args_array The arguments to pass to the Channel
  */
 PHP_METHOD(Channel, __construct) {
   wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis());
@@ -182,7 +182,7 @@ PHP_METHOD(Channel, getTarget) {
 
 /**
  * Get the connectivity state of the channel
- * @param bool (optional) try to connect on the channel
+ * @param bool $try_to_connect Try to connect on the channel (optional)
  * @return long The grpc connectivity state
  */
 PHP_METHOD(Channel, getConnectivityState) {
@@ -202,8 +202,8 @@ PHP_METHOD(Channel, getConnectivityState) {
 
 /**
  * Watch the connectivity state of the channel until it changed
- * @param long The previous connectivity state of the channel
- * @param Timeval The deadline this function should wait until
+ * @param long $last_state The previous connectivity state of the channel
+ * @param Timeval $deadline_obj The deadline this function should wait until
  * @return bool If the connectivity state changes from last_state
  *              before deadline
  */
diff --git a/src/php/ext/grpc/channel_credentials.c b/src/php/ext/grpc/channel_credentials.c
index 0b356aa25f..a32c4a4ea2 100644
--- a/src/php/ext/grpc/channel_credentials.c
+++ b/src/php/ext/grpc/channel_credentials.c
@@ -97,7 +97,7 @@ zval *grpc_php_wrap_channel_credentials(grpc_channel_credentials
 
 /**
  * Set default roots pem.
- * @param string pem_roots PEM encoding of the server root certificates
+ * @param string $pem_roots PEM encoding of the server root certificates
  * @return void
  */
 PHP_METHOD(ChannelCredentials, setDefaultRootsPem) {
@@ -129,11 +129,11 @@ PHP_METHOD(ChannelCredentials, createDefault) {
 
 /**
  * Create SSL credentials.
- * @param string pem_root_certs PEM encoding of the server root certificates
- * @param string pem_private_key PEM encoding of the client's private key
- *     (optional)
- * @param string pem_cert_chain PEM encoding of the client's certificate chain
- *     (optional)
+ * @param string $pem_root_certs PEM encoding of the server root certificates
+ * @param string $pem_key_cert_pair.private_key PEM encoding of the client's
+ *                                              private key (optional)
+ * @param string $pem_key_cert_pair.cert_chain PEM encoding of the client's
+ *                                             certificate chain (optional)
  * @return ChannelCredentials The new SSL credentials object
  */
 PHP_METHOD(ChannelCredentials, createSsl) {
@@ -168,8 +168,8 @@ PHP_METHOD(ChannelCredentials, createSsl) {
 
 /**
  * Create composite credentials from two existing credentials.
- * @param ChannelCredentials cred1 The first credential
- * @param CallCredentials cred2 The second credential
+ * @param ChannelCredentials $cred1_obj The first credential
+ * @param CallCredentials $cred2_obj The second credential
  * @return ChannelCredentials The new composite credentials object
  */
 PHP_METHOD(ChannelCredentials, createComposite) {
diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c
index 76f3869d01..2217a4f9a8 100644
--- a/src/php/ext/grpc/server.c
+++ b/src/php/ext/grpc/server.c
@@ -84,7 +84,7 @@ php_grpc_zend_object create_wrapped_grpc_server(zend_class_entry *class_type
 
 /**
  * Constructs a new instance of the Server class
- * @param array $args The arguments to pass to the server (optional)
+ * @param array $args_array The arguments to pass to the server (optional)
  */
 PHP_METHOD(Server, __construct) {
   wrapped_grpc_server *server = Z_WRAPPED_GRPC_SERVER_P(getThis());
@@ -180,7 +180,7 @@ PHP_METHOD(Server, requestCall) {
 /**
  * Add a http2 over tcp listener.
  * @param string $addr The address to add
- * @return bool true on success, false on failure
+ * @return bool True on success, false on failure
  */
 PHP_METHOD(Server, addHttp2Port) {
   const char *addr;
@@ -201,7 +201,7 @@ PHP_METHOD(Server, addHttp2Port) {
  * Add a secure http2 over tcp listener.
  * @param string $addr The address to add
  * @param ServerCredentials The ServerCredentials object
- * @return bool true on success, false on failure
+ * @return bool True on success, false on failure
  */
 PHP_METHOD(Server, addSecureHttp2Port) {
   const char *addr;
diff --git a/src/php/ext/grpc/timeval.c b/src/php/ext/grpc/timeval.c
index 3499b6485f..945231b47f 100644
--- a/src/php/ext/grpc/timeval.c
+++ b/src/php/ext/grpc/timeval.c
@@ -80,7 +80,7 @@ zval *grpc_php_wrap_timeval(gpr_timespec wrapped TSRMLS_DC) {
 
 /**
  * Constructs a new instance of the Timeval class
- * @param long $usec The number of microseconds in the interval
+ * @param long $microseconds The number of microseconds in the interval
  */
 PHP_METHOD(Timeval, __construct) {
   wrapped_grpc_timeval *timeval = Z_WRAPPED_GRPC_TIMEVAL_P(getThis());
@@ -100,7 +100,7 @@ PHP_METHOD(Timeval, __construct) {
 /**
  * Adds another Timeval to this one and returns the sum. Calculations saturate
  * at infinities.
- * @param Timeval $other The other Timeval object to add
+ * @param Timeval $other_obj The other Timeval object to add
  * @return Timeval A new Timeval object containing the sum
  */
 PHP_METHOD(Timeval, add) {
@@ -126,8 +126,8 @@ PHP_METHOD(Timeval, add) {
 /**
  * Subtracts another Timeval from this one and returns the difference.
  * Calculations saturate at infinities.
- * @param Timeval $other The other Timeval object to subtract
- * @param Timeval A new Timeval object containing the sum
+ * @param Timeval $other_obj The other Timeval object to subtract
+ * @return Timeval A new Timeval object containing the diff 
  */
 PHP_METHOD(Timeval, subtract) {
   zval *other_obj;
@@ -152,8 +152,8 @@ PHP_METHOD(Timeval, subtract) {
 /**
  * Return negative, 0, or positive according to whether a < b, a == b,
  * or a > b respectively.
- * @param Timeval $a The first time to compare
- * @param Timeval $b The second time to compare
+ * @param Timeval $a_obj The first time to compare
+ * @param Timeval $b_obj The second time to compare
  * @return long
  */
 PHP_METHOD(Timeval, compare) {
@@ -176,9 +176,9 @@ PHP_METHOD(Timeval, compare) {
 
 /**
  * Checks whether the two times are within $threshold of each other
- * @param Timeval $a The first time to compare
- * @param Timeval $b The second time to compare
- * @param Timeval $threshold The threshold to check against
+ * @param Timeval $a_obj The first time to compare
+ * @param Timeval $b_obj The second time to compare
+ * @param Timeval $thresh_obj The threshold to check against
  * @return bool True if $a and $b are within $threshold, False otherwise
  */
 PHP_METHOD(Timeval, similar) {
-- 
GitLab