Skip to content

Commit

Permalink
wrap long lines;
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley-cheung committed Jul 20, 2016
1 parent bae0cf1 commit 69c565b
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/php/ext/grpc/channel_credentials.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ zend_object_value create_wrapped_grpc_channel_credentials(
return retval;
}

zval *grpc_php_wrap_channel_credentials(grpc_channel_credentials *wrapped TSRMLS_DC) {
zval *grpc_php_wrap_channel_credentials(grpc_channel_credentials
*wrapped TSRMLS_DC) {
zval *credentials_object;
MAKE_STD_ZVAL(credentials_object);
object_init_ex(credentials_object, grpc_ce_channel_credentials);
Expand Down
3 changes: 2 additions & 1 deletion src/php/ext/grpc/server_credentials.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ zend_object_value create_wrapped_grpc_server_credentials(
return retval;
}

zval *grpc_php_wrap_server_credentials(grpc_server_credentials *wrapped TSRMLS_DC) {
zval *grpc_php_wrap_server_credentials(grpc_server_credentials
*wrapped TSRMLS_DC) {
zval *server_credentials_object;
MAKE_STD_ZVAL(server_credentials_object);
object_init_ex(server_credentials_object, grpc_ce_server_credentials);
Expand Down
6 changes: 4 additions & 2 deletions src/php/ext/grpc/timeval.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ PHP_METHOD(Timeval, add) {
wrapped_grpc_timeval *other =
(wrapped_grpc_timeval *)zend_object_store_get_object(other_obj TSRMLS_CC);
zval *sum =
grpc_php_wrap_timeval(gpr_time_add(self->wrapped, other->wrapped) TSRMLS_CC);
grpc_php_wrap_timeval(gpr_time_add(self->wrapped, other->wrapped)
TSRMLS_CC);
RETURN_DESTROY_ZVAL(sum);
#else
wrapped_grpc_timeval *self = Z_WRAPPED_GRPC_TIMEVAL_P(getThis());
Expand Down Expand Up @@ -200,7 +201,8 @@ PHP_METHOD(Timeval, subtract) {
wrapped_grpc_timeval *other =
(wrapped_grpc_timeval *)zend_object_store_get_object(other_obj TSRMLS_CC);
zval *diff =
grpc_php_wrap_timeval(gpr_time_sub(self->wrapped, other->wrapped) TSRMLS_CC);
grpc_php_wrap_timeval(gpr_time_sub(self->wrapped, other->wrapped)
TSRMLS_CC);
RETURN_DESTROY_ZVAL(diff);
#else
wrapped_grpc_timeval *self = Z_WRAPPED_GRPC_TIMEVAL_P(getThis());
Expand Down
3 changes: 2 additions & 1 deletion src/php/tests/unit_tests/CallCredentialsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ public function testCreateComposite()
$this->call_credentials,
$call_credentials2
);
$this->assertSame('Grpc\CallCredentials', get_class($call_credentials3));
$this->assertSame('Grpc\CallCredentials',
get_class($call_credentials3));
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/php/tests/unit_tests/CallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public function testAddSingleAndMultiValueMetadata()
{
$batch = [
Grpc\OP_SEND_INITIAL_METADATA => ['key1' => ['value1'],
'key2' => ['value2', 'value3'], ],
'key2' => ['value2',
'value3'], ],
];
$result = $this->call->startBatch($batch);
$this->assertTrue($result->send_metadata);
Expand Down
3 changes: 2 additions & 1 deletion src/php/tests/unit_tests/ChannelCredentialsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public function tearDown()

public function testCreateSslWith3Null()
{
$channel_credentials = Grpc\ChannelCredentials::createSsl(null, null, null);
$channel_credentials = Grpc\ChannelCredentials::createSsl(null, null,
null);
$this->assertNotNull($channel_credentials);
}

Expand Down
3 changes: 2 additions & 1 deletion src/php/tests/unit_tests/EndToEndTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,8 @@ public function testGetTarget()

public function testGetConnectivityState()
{
$this->assertTrue($this->channel->getConnectivityState() == Grpc\CHANNEL_IDLE);
$this->assertTrue($this->channel->getConnectivityState() ==
Grpc\CHANNEL_IDLE);
}

public function testWatchConnectivityStateFailed()
Expand Down
3 changes: 2 additions & 1 deletion src/php/tests/unit_tests/ServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public function testRequestCall()
$call = new Grpc\Call($channel, 'dummy_method', $deadline);

$event = $call->startBatch([Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true, ]);
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
]);

$c = $this->server->requestCall();
$this->assertObjectHasAttribute('call', $c);
Expand Down

0 comments on commit 69c565b

Please sign in to comment.