Skip to content

Commit 3f66609

Browse files
committed
code formatting fixes
1 parent 61ed499 commit 3f66609

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/platform/src/Bridge/Anthropic/ModelClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function request(Model $model, array|string $payload, array $options = []
5050

5151
if (
5252
isset($options['beta_features'])
53-
&& is_array($options['beta_features'])
53+
&& \is_array($options['beta_features'])
5454
&& !empty($options['beta_features'])
5555
) {
5656
$headers['anthropic-beta'] = implode(',', $options['beta_features']);

src/platform/tests/Bridge/Anthropic/ModelClientTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ class ModelClientTest extends TestCase
2525
private ModelClient $modelClient;
2626
private Claude $model;
2727

28+
protected function setUp(): void
29+
{
30+
$this->model = new Claude();
31+
}
32+
2833
public function testAnthropicBetaHeaderIsSetWithSingleBetaFeature()
2934
{
3035
$this->httpClient = new MockHttpClient(function ($method, $url, $options) {
@@ -94,16 +99,11 @@ public function testAnthropicBetaHeaderIsNotSetWhenBetaFeaturesIsNotProvided()
9499
$this->modelClient->request($this->model, ['message' => 'test'], $options);
95100
}
96101

97-
protected function setUp(): void
98-
{
99-
$this->model = new Claude();
100-
}
101-
102102
private function parseHeaders(array $headers): array
103103
{
104104
$parsed = [];
105105
foreach ($headers as $header) {
106-
if (strpos($header, ':') !== false) {
106+
if (str_contains($header, ':')) {
107107
[$key, $value] = explode(':', $header, 2);
108108
$parsed[trim($key)] = trim($value);
109109
}

0 commit comments

Comments
 (0)