wrap long lines;

pull/7464/head^2
Stanley Cheung 9 years ago
parent bae0cf1706
commit 69c565bd60
  1. 3
      src/php/ext/grpc/channel_credentials.c
  2. 3
      src/php/ext/grpc/server_credentials.c
  3. 6
      src/php/ext/grpc/timeval.c
  4. 3
      src/php/tests/unit_tests/CallCredentialsTest.php
  5. 3
      src/php/tests/unit_tests/CallTest.php
  6. 3
      src/php/tests/unit_tests/ChannelCredentialsTest.php
  7. 3
      src/php/tests/unit_tests/EndToEndTest.php
  8. 3
      src/php/tests/unit_tests/ServerTest.php

@ -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);

@ -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);

@ -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());
@ -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());

@ -148,7 +148,8 @@ class CallCredentialsTest extends PHPUnit_Framework_TestCase
$this->call_credentials,
$call_credentials2
);
$this->assertSame('Grpc\CallCredentials', get_class($call_credentials3));
$this->assertSame('Grpc\CallCredentials',
get_class($call_credentials3));
}
/**

@ -93,7 +93,8 @@ class CallTest extends PHPUnit_Framework_TestCase
{
$batch = [
Grpc\OP_SEND_INITIAL_METADATA => ['key1' => ['value1'],
'key2' => ['value2', 'value3'], ],
'key2' => ['value2',
'value3'], ],
];
$result = $this->call->startBatch($batch);
$this->assertTrue($result->send_metadata);

@ -44,7 +44,8 @@ class ChanellCredentialsTest extends PHPUnit_Framework_TestCase
public function testCreateSslWith3Null()
{
$channel_credentials = Grpc\ChannelCredentials::createSsl(null, null, null);
$channel_credentials = Grpc\ChannelCredentials::createSsl(null, null,
null);
$this->assertNotNull($channel_credentials);
}

@ -521,7 +521,8 @@ class EndToEndTest extends PHPUnit_Framework_TestCase
public function testGetConnectivityState()
{
$this->assertTrue($this->channel->getConnectivityState() == Grpc\CHANNEL_IDLE);
$this->assertTrue($this->channel->getConnectivityState() ==
Grpc\CHANNEL_IDLE);
}
public function testWatchConnectivityStateFailed()

@ -76,7 +76,8 @@ class ServerTest extends PHPUnit_Framework_TestCase
$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);

Loading…
Cancel
Save