Skip to content

Commit 6b70218

Browse files
JasonTamegithub-actions[bot]
authored andcommitted
Fix styling
1 parent d342be3 commit 6b70218

9 files changed

Lines changed: 13 additions & 20 deletions

File tree

src/Http/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private function createClient(): GuzzleClient
5959
));
6060

6161
return new GuzzleClient([
62-
'base_uri' => rtrim($this->config['base_url'], '/') . '/',
62+
'base_uri' => rtrim($this->config['base_url'], '/').'/',
6363
'timeout' => $this->config['timeout'],
6464
'connect_timeout' => $this->config['connect_timeout'],
6565
'verify' => $this->config['verify_ssl'],
@@ -323,7 +323,7 @@ private function parseResponse(ResponseInterface $response): array
323323

324324
if (json_last_error() !== JSON_ERROR_NONE) {
325325
throw new LangGraphException(
326-
'Failed to decode JSON response: ' . json_last_error_msg(),
326+
'Failed to decode JSON response: '.json_last_error_msg(),
327327
$response->getStatusCode(),
328328
null,
329329
$response

src/Resources/ThreadsClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function messages(string $threadId, array $params = []): array
120120
public function getState(string $threadId, array $params = []): array
121121
{
122122
$queryParams = http_build_query($params);
123-
$endpoint = "threads/{$threadId}/state" . ($queryParams ? "?{$queryParams}" : '');
123+
$endpoint = "threads/{$threadId}/state".($queryParams ? "?{$queryParams}" : '');
124124

125125
return $this->httpClient->get($endpoint);
126126
}
@@ -131,7 +131,7 @@ public function getState(string $threadId, array $params = []): array
131131
public function getHistory(string $threadId, array $params = []): array
132132
{
133133
$queryParams = http_build_query($params);
134-
$endpoint = "threads/{$threadId}/history" . ($queryParams ? "?{$queryParams}" : '');
134+
$endpoint = "threads/{$threadId}/history".($queryParams ? "?{$queryParams}" : '');
135135

136136
return $this->httpClient->get($endpoint);
137137
}

tests/Http/ClientTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,28 +58,28 @@
5858
it('throws unauthorized exception for 401 errors', function () {
5959
$this->mockErrorResponse(401, 'Unauthorized');
6060

61-
expect(fn() => $this->client->getHttpClient()->get('test'))
61+
expect(fn () => $this->client->getHttpClient()->get('test'))
6262
->toThrow(UnauthorizedException::class);
6363
});
6464

6565
it('throws bad request exception for 400 errors', function () {
6666
$this->mockErrorResponse(400, 'Bad Request');
6767

68-
expect(fn() => $this->client->getHttpClient()->get('test'))
68+
expect(fn () => $this->client->getHttpClient()->get('test'))
6969
->toThrow(BadRequestException::class);
7070
});
7171

7272
it('throws not found exception for 404 errors', function () {
7373
$this->mockErrorResponse(404, 'Not Found');
7474

75-
expect(fn() => $this->client->getHttpClient()->get('test'))
75+
expect(fn () => $this->client->getHttpClient()->get('test'))
7676
->toThrow(NotFoundException::class);
7777
});
7878

7979
it('throws generic exception for other errors', function () {
8080
$this->mockErrorResponse(500, 'Internal Server Error');
8181

82-
expect(fn() => $this->client->getHttpClient()->get('test'))
82+
expect(fn () => $this->client->getHttpClient()->get('test'))
8383
->toThrow(LangGraphException::class);
8484
});
8585

@@ -115,6 +115,6 @@
115115
};
116116

117117
// This will test the stream method exists and is callable
118-
expect(fn() => $this->client->getHttpClient()->stream('GET', 'test', [], $callback))
118+
expect(fn () => $this->client->getHttpClient()->stream('GET', 'test', [], $callback))
119119
->not->toThrow(Exception::class);
120120
});

tests/LangGraphPlatformTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
});
2222

2323
it('can be instantiated without config', function () {
24-
$client = new LangGraphPlatform();
24+
$client = new LangGraphPlatform;
2525

2626
expect($client)->toBeInstanceOf(LangGraphPlatform::class);
2727
});
@@ -46,7 +46,7 @@
4646
});
4747

4848
it('can be configured after instantiation', function () {
49-
$client = new LangGraphPlatform();
49+
$client = new LangGraphPlatform;
5050

5151
$newConfig = ['api_key' => 'new-key'];
5252
$configuredClient = $client->configure($newConfig);

tests/Resources/AssistantsClientTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
declare(strict_types=1);
44

5-
6-
75
it('can create an assistant', function () {
86
$assistantData = [
97
'graph_id' => 'test-graph',

tests/Resources/RunsClientTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
declare(strict_types=1);
44

5-
6-
75
it('can create a run on a thread', function () {
86
$threadId = 'thread_123';
97
$runData = [

tests/Resources/StoreClientTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
declare(strict_types=1);
44

5-
6-
75
it('can put a value in store', function () {
86
$namespace = 'test-namespace';
97
$key = 'test-key';

tests/Resources/ThreadsClientTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
declare(strict_types=1);
44

5-
6-
75
it('can create a thread', function () {
86
$threadData = [
97
'metadata' => ['key' => 'value'],

tests/TestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
class TestCase extends Orchestra
1616
{
1717
protected MockHandler $mockHandler;
18+
1819
protected LangGraphPlatform $client;
1920

2021
protected function setUp(): void
@@ -40,7 +41,7 @@ public function getEnvironmentSetUp($app)
4041

4142
protected function setupMockHttpClient(): void
4243
{
43-
$this->mockHandler = new MockHandler();
44+
$this->mockHandler = new MockHandler;
4445
}
4546

4647
protected function setupLangGraphClient(): void

0 commit comments

Comments
 (0)