remove 'method_exists' clause

pull/23020/head
jeffreyqw 5 years ago
parent 35993468cd
commit 3a598311af
  1. 5
      src/php/lib/Grpc/AbstractCall.php

@ -114,14 +114,9 @@ abstract class AbstractCall
protected function _serializeMessage($data) protected function _serializeMessage($data)
{ {
// Proto3 implementation // Proto3 implementation
if (method_exists($data, 'serializeToString')) {
return $data->serializeToString(); return $data->serializeToString();
} }
// Protobuf-PHP implementation
return $data->serialize();
}
/** /**
* Deserialize a response value to an object. * Deserialize a response value to an object.
* *

Loading…
Cancel
Save