From 9a669b64a248f539d350dcb6c5e4ad817f66519d Mon Sep 17 00:00:00 2001 From: thinkerou Date: Tue, 1 Nov 2016 21:31:43 +0800 Subject: update php style --- src/php/lib/Grpc/AbstractCall.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/php/lib/Grpc/AbstractCall.php') diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php index e24be3fc76..c4d56790f7 100644 --- a/src/php/lib/Grpc/AbstractCall.php +++ b/src/php/lib/Grpc/AbstractCall.php @@ -35,7 +35,7 @@ namespace Grpc; /** - * Class AbstractCall + * Class AbstractCall. * @package Grpc */ abstract class AbstractCall @@ -121,13 +121,14 @@ abstract class AbstractCall } /** - * Serialize a message to the protobuf binary format + * Serialize a message to the protobuf binary format. * * @param mixed $data The Protobuf message * * @return string The protobuf binary format */ - protected function serializeMessage($data) { + protected function serializeMessage($data) + { // Proto3 implementation if (method_exists($data, 'encode')) { return $data->encode(); @@ -155,6 +156,7 @@ abstract class AbstractCall list($className, $deserializeFunc) = $this->deserialize; $obj = new $className(); $obj->$deserializeFunc($value); + return $obj; } -- cgit v1.2.3