Skip to content

Commit da8d2ac

Browse files
Erdem Köseerdemkose
authored andcommitted
Fix style issue
1 parent 285f4a1 commit da8d2ac

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/ChatSession.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function sendMessage(PartInterface ...$parts): GenerateContentResponse
3737
->withGenerationConfig($config)
3838
->generateContentWithContents($this->history);
3939

40-
if(!empty($response->candidates)) {
40+
if (!empty($response->candidates)) {
4141
$parts = $response->candidates[0]->content->parts;
4242
$this->history[] = new Content($parts, Role::Model);
4343
}
@@ -58,7 +58,7 @@ public function sendMessageStream(
5858

5959
$parts = [];
6060
$partsCollectorCallback = function (GenerateContentResponse $response) use ($callback, &$parts) {
61-
if(!empty($response->candidates)) {
61+
if (!empty($response->candidates)) {
6262
array_push($parts, ...$response->parts());
6363
}
6464

tests/Unit/ClientTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
class ClientTest extends TestCase
2525
{
26-
public function testConstructor()
26+
public function testConstructor(): void
2727
{
2828
$client = new Client(
2929
'test-api-key',
@@ -32,7 +32,7 @@ public function testConstructor()
3232
self::assertInstanceOf(Client::class, $client);
3333
}
3434

35-
public function testWithBaseUrl()
35+
public function testWithBaseUrl(): void
3636
{
3737
$client = new Client(
3838
'test-api-key',
@@ -42,7 +42,7 @@ public function testWithBaseUrl()
4242
self::assertInstanceOf(Client::class, $client);
4343
}
4444

45-
public function testGeminiPro()
45+
public function testGeminiPro(): void
4646
{
4747
$client = new Client(
4848
'test-api-key',
@@ -53,7 +53,7 @@ public function testGeminiPro()
5353
self::assertEquals(ModelName::GEMINI_PRO, $model->modelName);
5454
}
5555

56-
public function testGeminiProWithEnum()
56+
public function testGeminiProWithEnum(): void
5757
{
5858
$client = new Client(
5959
'test-api-key',
@@ -75,7 +75,7 @@ public function testGenerativeModel()
7575
self::assertEquals(ModelName::EMBEDDING_001, $model->modelName);
7676
}
7777

78-
public function testGenerateContent()
78+
public function testGenerateContent(): void
7979
{
8080
$httpRequest = new Request(
8181
'POST',
@@ -152,7 +152,7 @@ public function testGenerateContent()
152152
self::assertEquals('This is the Gemini Pro response', $response->text());
153153
}
154154

155-
public function testEmbedContent()
155+
public function testEmbedContent(): void
156156
{
157157
$httpRequest = new Request(
158158
'POST',
@@ -207,7 +207,7 @@ public function testEmbedContent()
207207
self::assertEquals([0.041395925, -0.017692696], $response->embedding->values);
208208
}
209209

210-
public function testCountTokens()
210+
public function testCountTokens(): void
211211
{
212212
$httpRequest = new Request(
213213
'POST',
@@ -257,7 +257,7 @@ public function testCountTokens()
257257
self::assertEquals(10, $response->totalTokens);
258258
}
259259

260-
public function testListModels()
260+
public function testListModels(): void
261261
{
262262
$httpRequest = new Request(
263263
'GET',

0 commit comments

Comments
 (0)