aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/lib/Grpc
diff options
context:
space:
mode:
authorGravatar murgatroid99 <michael.lumish@gmail.com>2015-02-02 11:05:01 -0800
committerGravatar murgatroid99 <michael.lumish@gmail.com>2015-02-02 11:05:01 -0800
commit25e5f67bb95f4c848c003f19272b8c1030efbfe5 (patch)
treee4886de5f2d554edfe63653c9d31f3decbed1ecc /src/php/lib/Grpc
parent26b18f09b966a110b5cba5eca325928c868298f0 (diff)
Removed all instances of == and != in PHP code
Diffstat (limited to 'src/php/lib/Grpc')
-rwxr-xr-xsrc/php/lib/Grpc/AbstractSurfaceActiveCall.php2
-rwxr-xr-xsrc/php/lib/Grpc/ActiveCall.php7
-rwxr-xr-xsrc/php/lib/Grpc/ServerStreamingSurfaceActiveCall.php2
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;
}
}