Skip to content

Commit 6fc0c9f

Browse files
committed
Fix new setHttpClient Method
1 parent b5c8f02 commit 6fc0c9f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/HetznerAPIClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ public function setBaseUrl(string $baseUrl): self
113113
}
114114

115115
/**
116-
* @return GuzzleClient
116+
* @return Client
117117
*/
118-
public function getHttpClient(): GuzzleClient
118+
public function getHttpClient(): Client
119119
{
120120
return $this->httpClient;
121121
}
122122

123123
/**
124-
* @return GuzzleClient
124+
* @return Client
125125
*/
126-
public function setHttpClient(GuzzleClient $client): self
126+
public function setHttpClient(Client $client): self
127127
{
128128
$this->httpClient = $client;
129129
return $this;

tests/Integration/BasicClientTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace Tests;
1010

11+
use GuzzleHttp\Client;
1112
use LKDev\HetznerCloud\Clients\GuzzleClient;
1213
use LKDev\HetznerCloud\HetznerAPIClient;
1314
use LKDev\HetznerCloud\Models\Actions\Actions;
@@ -68,7 +69,7 @@ public function testSetUserAgent()
6869
public function testSetHttpClient()
6970
{
7071
$client = new HetznerAPIClient('IAmTheTestToken', '');
71-
$httpClient = new GuzzleClient($client);
72+
$httpClient = new Client();
7273
$client->setHttpClient($httpClient);
7374
$this->assertEquals($httpClient, $client->getHttpClient());
7475
}

0 commit comments

Comments
 (0)