Skip to content

Commit 2958e04

Browse files
committed
sync code to grpc/grpc v1.57.0
1 parent 7244c38 commit 2958e04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib/BaseStub.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BaseStub
4343
*/
4444
public function __construct($hostname, $opts, $channel = null)
4545
{
46-
if (!method_exists('ChannelCredentials', 'isDefaultRootsPemSet') ||
46+
if (!method_exists('Grpc\ChannelCredentials', 'isDefaultRootsPemSet') ||
4747
!ChannelCredentials::isDefaultRootsPemSet()) {
4848
$ssl_roots = file_get_contents(
4949
dirname(__FILE__).'/../../etc/roots.pem'
@@ -120,7 +120,7 @@ private static function updateOpts($opts) {
120120
public static function getDefaultChannel($hostname, array $opts)
121121
{
122122
$channel_opts = self::updateOpts($opts);
123-
return new Channel($hostname, $opts);
123+
return new Channel($hostname, $channel_opts);
124124
}
125125

126126
/**
@@ -145,7 +145,7 @@ public function getConnectivityState($try_to_connect = false)
145145
* @param int $timeout in microseconds
146146
*
147147
* @return bool true if channel is ready
148-
* @throw Exception if channel is in FATAL_ERROR state
148+
* @throws Exception if channel is in FATAL_ERROR state
149149
*/
150150
public function waitForReady($timeout)
151151
{
@@ -183,7 +183,7 @@ public function close()
183183
* @param $new_state Connect state
184184
*
185185
* @return bool true if state is CHANNEL_READY
186-
* @throw Exception if state is CHANNEL_FATAL_FAILURE
186+
* @throws Exception if state is CHANNEL_FATAL_FAILURE
187187
*/
188188
private function _checkConnectivityState($new_state)
189189
{
@@ -242,7 +242,7 @@ private function _get_jwt_aud_uri($method)
242242
* @param array $metadata The metadata map
243243
*
244244
* @return array $metadata Validated and key-normalized metadata map
245-
* @throw InvalidArgumentException if key contains invalid characters
245+
* @throws InvalidArgumentException if key contains invalid characters
246246
*/
247247
private function _validate_and_normalize_metadata($metadata)
248248
{

0 commit comments

Comments
 (0)