Skip to content

Commit dbf9766

Browse files
committed
refactor: ensure a HandlerStack instance is used as handler
1 parent 44c2ccd commit dbf9766

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Connection.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct(array $config, HandlerStack $handler = null)
4848
],
4949
];
5050

51-
if ($handler) {
51+
if ($handler instanceof HandlerStack) {
5252
$options['handler'] = $handler;
5353
}
5454

@@ -91,7 +91,11 @@ public function api(string $name): API\AbstractAPI
9191
return new $class($this);
9292
}
9393

94-
public function getHttpClient()
94+
/**
95+
* Get the Guzzle client instance.
96+
* @return \GuzzleHttp\Client
97+
*/
98+
public function getHttpClient(): Client
9599
{
96100
return $this->httpClient;
97101
}

0 commit comments

Comments
 (0)