Skip to content

Commit 56f51eb

Browse files
committed
minor #411 [Agent][Platform] Fix #[\SensitiveParameter] formatting to single line (OskarStark)
This PR was merged into the main branch. Discussion ---------- [Agent][Platform] Fix `#[\SensitiveParameter]` formatting to single line | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | -- | License | MIT Changed multi-line #[\SensitiveParameter] attributes to single-line format for better readability and consistency across the codebase. Commits ------- ce382b8 Fix #[\SensitiveParameter] formatting to single line
2 parents d8c374e + ce382b8 commit 56f51eb

File tree

17 files changed

+17
-34
lines changed

17 files changed

+17
-34
lines changed

src/agent/src/Toolbox/Tool/Brave.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
*/
2727
public function __construct(
2828
private HttpClientInterface $httpClient,
29-
#[\SensitiveParameter]
30-
private string $apiKey,
29+
#[\SensitiveParameter] private string $apiKey,
3130
private array $options = [],
3231
) {
3332
}

src/platform/src/Bridge/Anthropic/PlatformFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
final readonly class PlatformFactory
2424
{
2525
public static function create(
26-
#[\SensitiveParameter]
27-
string $apiKey,
26+
#[\SensitiveParameter] string $apiKey,
2827
?HttpClientInterface $httpClient = null,
2928
?Contract $contract = null,
3029
): Platform {

src/platform/src/Bridge/Azure/OpenAi/PlatformFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ public static function create(
2929
string $baseUrl,
3030
string $deployment,
3131
string $apiVersion,
32-
#[\SensitiveParameter]
33-
string $apiKey,
32+
#[\SensitiveParameter] string $apiKey,
3433
?HttpClientInterface $httpClient = null,
3534
?Contract $contract = null,
3635
): Platform {

src/platform/src/Bridge/Gemini/Embeddings/ModelClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
{
2525
public function __construct(
2626
private HttpClientInterface $httpClient,
27-
#[\SensitiveParameter]
28-
private string $apiKey,
27+
#[\SensitiveParameter] private string $apiKey,
2928
) {
3029
}
3130

src/platform/src/Bridge/Gemini/PlatformFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
final readonly class PlatformFactory
2828
{
2929
public static function create(
30-
#[\SensitiveParameter]
31-
string $apiKey,
30+
#[\SensitiveParameter] string $apiKey,
3231
?HttpClientInterface $httpClient = null,
3332
?Contract $contract = null,
3433
): Platform {

src/platform/src/Bridge/HuggingFace/ModelClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
public function __construct(
2828
HttpClientInterface $httpClient,
2929
private string $provider,
30-
#[\SensitiveParameter]
31-
private string $apiKey,
30+
#[\SensitiveParameter] private string $apiKey,
3231
) {
3332
$this->httpClient = $httpClient instanceof EventSourceHttpClient ? $httpClient : new EventSourceHttpClient($httpClient);
3433
}

src/platform/src/Bridge/HuggingFace/PlatformFactory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
final readonly class PlatformFactory
2525
{
2626
public static function create(
27-
#[\SensitiveParameter]
28-
string $apiKey,
27+
#[\SensitiveParameter] string $apiKey,
2928
string $provider = Provider::HF_INFERENCE,
3029
?HttpClientInterface $httpClient = null,
3130
?Contract $contract = null,

src/platform/src/Bridge/Mistral/Embeddings/ModelClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727

2828
public function __construct(
2929
HttpClientInterface $httpClient,
30-
#[\SensitiveParameter]
31-
private string $apiKey,
30+
#[\SensitiveParameter] private string $apiKey,
3231
) {
3332
$this->httpClient = $httpClient instanceof EventSourceHttpClient ? $httpClient : new EventSourceHttpClient($httpClient);
3433
}

src/platform/src/Bridge/Mistral/Llm/ModelClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727

2828
public function __construct(
2929
HttpClientInterface $httpClient,
30-
#[\SensitiveParameter]
31-
private string $apiKey,
30+
#[\SensitiveParameter] private string $apiKey,
3231
) {
3332
$this->httpClient = $httpClient instanceof EventSourceHttpClient ? $httpClient : new EventSourceHttpClient($httpClient);
3433
}

src/platform/src/Bridge/OpenAi/DallE/ModelClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
{
2828
public function __construct(
2929
private HttpClientInterface $httpClient,
30-
#[\SensitiveParameter]
31-
private string $apiKey,
30+
#[\SensitiveParameter] private string $apiKey,
3231
) {
3332
if ('' === $apiKey) {
3433
throw new InvalidArgumentException('The API key must not be empty.');

0 commit comments

Comments
 (0)