diff options
Diffstat (limited to 'src/php/lib')
-rwxr-xr-x | src/php/lib/Grpc/AbstractSurfaceActiveCall.php | 2 | ||||
-rwxr-xr-x | src/php/lib/Grpc/ActiveCall.php | 7 | ||||
-rwxr-xr-x | src/php/lib/Grpc/ServerStreamingSurfaceActiveCall.php | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/src/php/lib/Grpc/AbstractSurfaceActiveCall.php b/src/php/lib/Grpc/AbstractSurfaceActiveCall.php index 53c7d4cd1a..83e4719c9a 100755 --- a/src/php/lib/Grpc/AbstractSurfaceActiveCall.php +++ b/src/php/lib/Grpc/AbstractSurfaceActiveCall.php @@ -44,7 +44,7 @@ abstract class AbstractSurfaceActiveCall { protected function _read() { $response = $this->active_call->read(); - if ($response == null) { + if ($response === null) { return null; } return call_user_func($this->deserialize, $response); diff --git a/src/php/lib/Grpc/ActiveCall.php b/src/php/lib/Grpc/ActiveCall.php index e0ea43ab08..847cfee1ec 100755 --- a/src/php/lib/Grpc/ActiveCall.php +++ b/src/php/lib/Grpc/ActiveCall.php @@ -66,12 +66,7 @@ class ActiveCall { * @param ByteBuffer $data The data to write */ public function write($data) { - if($this->call->start_write($data, - WRITE_ACCEPTED, - $this->flags) != OP_OK) { - // TODO(mlumish): more useful error - throw new \Exception("Cannot call write after writesDone"); - } + $this->call->start_write($data, WRITE_ACCEPTED, $this->flags); $this->completion_queue->pluck(WRITE_ACCEPTED, Timeval::inf_future()); } diff --git a/src/php/lib/Grpc/ServerStreamingSurfaceActiveCall.php b/src/php/lib/Grpc/ServerStreamingSurfaceActiveCall.php index 082f995d8a..f131d6bab5 100755 --- a/src/php/lib/Grpc/ServerStreamingSurfaceActiveCall.php +++ b/src/php/lib/Grpc/ServerStreamingSurfaceActiveCall.php @@ -31,7 +31,7 @@ class ServerStreamingSurfaceActiveCall extends AbstractSurfaceActiveCall { * @return An iterator of response values */ public function responses() { - while(($response = $this->_read()) != null) { + while(($response = $this->_read()) !== null) { yield $response; } } |