Skip to content

Commit 7f05da6

Browse files
php: ran php-cs-fixer again
1 parent 2796813 commit 7f05da6

10 files changed

+20
-24
lines changed

src/php/tests/bootstrap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
*/
1818

1919
error_reporting(E_ALL | E_STRICT);
20-
require dirname(__DIR__) . '/vendor/autoload.php';
20+
require dirname(__DIR__).'/vendor/autoload.php';
2121
date_default_timezone_set('UTC');

src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public function setUp()
4646
$a_copy['foo'] = ['bar'];
4747

4848
return $a_copy;
49-
}]);
49+
},
50+
]);
5051
}
5152

5253
public function tearDown()

src/php/tests/generated_code/math_client.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838

3939
function p($line)
4040
{
41-
print("$line<br/>\n");
41+
echo "$line<br/>\n";
4242
}
4343

4444
$host = 'localhost:50051';
4545
p("Connecting to host: $host");
4646
$client = new math\MathClient($host, [
47-
'credentials' => Grpc\ChannelCredentials::createInsecure()
47+
'credentials' => Grpc\ChannelCredentials::createInsecure(),
4848
]);
4949
p('Client class: '.get_class($client));
5050
p('');

src/php/tests/unit_tests/CallCredentials3Test.php

-1
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,4 @@ public function testCreateFromPlugin()
132132
unset($call);
133133
unset($server_call);
134134
}
135-
136135
}

src/php/tests/unit_tests/CallTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function testGetPeer()
9494

9595
public function testCancel()
9696
{
97-
$this->assertNull($this->call->cancel());
97+
$this->assertNull($this->call->cancel());
9898
}
9999

100100
/**
@@ -118,5 +118,4 @@ public function testInvalidMetadataInnerValue()
118118
];
119119
$result = $this->call->startBatch($batch);
120120
}
121-
122121
}

src/php/tests/unit_tests/ChannelCredentialsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ public function testCreateInsecure()
7070
$channel_credentials = Grpc\ChannelCredentials::createInsecure();
7171
$this->assertNull($channel_credentials);
7272
}
73-
}
73+
}

src/php/tests/unit_tests/ChannelTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@ public function testInvalidOptionsArray()
7878
]
7979
);
8080
}
81-
82-
}
81+
}

src/php/tests/unit_tests/EndToEndTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ public function testInvalidClientMessageFlags()
261261
Grpc\OP_SEND_INITIAL_METADATA => [],
262262
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
263263
Grpc\OP_SEND_MESSAGE => ['message' => 'abc',
264-
'flags' => 'invalid'],
264+
'flags' => 'invalid',
265+
],
265266
]);
266267
}
267268

@@ -574,7 +575,7 @@ public function testWatchConnectivityStateDoNothing()
574575
public function testGetConnectivityStateInvalidParam()
575576
{
576577
$this->assertTrue($this->channel->getConnectivityState(
577-
new Grpc\Timeval));
578+
new Grpc\Timeval()));
578579
}
579580

580581
/**
@@ -591,12 +592,11 @@ public function testWatchConnectivityStateInvalidParam()
591592
*/
592593
public function testChannelConstructorInvalidParam()
593594
{
594-
$this->channel = new Grpc\Channel('localhost:'.$this->port, NULL);
595+
$this->channel = new Grpc\Channel('localhost:'.$this->port, null);
595596
}
596597

597598
public function testClose()
598599
{
599600
$this->assertNull($this->channel->close());
600601
}
601-
602602
}

src/php/tests/unit_tests/ServerTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,4 @@ public function testInvalidAddSecureHttp2Port()
6767
$this->server = new Grpc\Server([]);
6868
$this->port = $this->server->addSecureHttp2Port(['0.0.0.0:0']);
6969
}
70-
71-
}
70+
}

src/php/tests/unit_tests/TimevalTest.php

+7-8
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ public function testAddAndSubtract()
9494

9595
public function testSimilar()
9696
{
97-
$a = Grpc\Timeval::now();
98-
$delta = new Grpc\Timeval(1000);
99-
$b = $a->add($delta);
100-
$thresh = new Grpc\Timeval(1100);
101-
$this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh));
102-
$thresh = new Grpc\Timeval(900);
103-
$this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh));
97+
$a = Grpc\Timeval::now();
98+
$delta = new Grpc\Timeval(1000);
99+
$b = $a->add($delta);
100+
$thresh = new Grpc\Timeval(1100);
101+
$this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh));
102+
$thresh = new Grpc\Timeval(900);
103+
$this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh));
104104
}
105105

106106
public function testSleepUntil()
@@ -155,5 +155,4 @@ public function testSimilarInvalidParam()
155155
{
156156
$a = Grpc\Timeval::similar(1000, 1100, 1200);
157157
}
158-
159158
}

0 commit comments

Comments
 (0)