aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/lib/Grpc/AbstractCall.php
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-08 08:46:46 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-11-08 08:46:46 -0800
commiteba86e18531c653d47b10645bd77ae4930bce563 (patch)
treeed3045218d4563257742f13e6d750c7cafa92cab /src/php/lib/Grpc/AbstractCall.php
parent3a41bbbe9bf3da96a7aead551b43f72bd470d1c0 (diff)
parent03a58cf3873879a4e4470a437e2c0b42c75c6a7c (diff)
Merge github.com:grpc/grpc into securityfuzzit
Diffstat (limited to 'src/php/lib/Grpc/AbstractCall.php')
-rw-r--r--src/php/lib/Grpc/AbstractCall.php8
1 files changed, 5 insertions, 3 deletions
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;
}