Skip to content

Commit 702ca71

Browse files
committed
[AI Bundle][MCP Bundle][Platform][Store] Remove useless inline comments from codebase
1 parent 8c017b4 commit 702ca71

File tree

9 files changed

+0
-26
lines changed

9 files changed

+0
-26
lines changed

tests/Bridge/Gemini/Contract/MessageBagNormalizerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ public function testNormalize(MessageBag $bag, array $expected)
6666
{
6767
$normalizer = new MessageBagNormalizer();
6868

69-
// Set up the inner normalizers
7069
$userMessageNormalizer = new UserMessageNormalizer();
7170
$assistantMessageNormalizer = new AssistantMessageNormalizer();
7271

73-
// Mock a normalizer that delegates to the appropriate concrete normalizer
7472
$mockNormalizer = $this->createMock(NormalizerInterface::class);
7573
$mockNormalizer->method('normalize')
7674
->willReturnCallback(function ($message) use ($userMessageNormalizer, $assistantMessageNormalizer): ?array {

tests/Bridge/HuggingFace/Contract/MessageBagNormalizerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ public function testNormalize(MessageBag $bag, array $expected)
5555
{
5656
$normalizer = new MessageBagNormalizer();
5757

58-
// Set up the concrete user message normalizer
5958
$userMessageNormalizer = new UserMessageNormalizer();
6059

61-
// Mock a normalizer that delegates to the concrete normalizer
6260
$mockNormalizer = $this->createMock(NormalizerInterface::class);
6361
$mockNormalizer->method('normalize')
6462
->willReturnCallback(function ($messages) use ($userMessageNormalizer): array {

tests/Bridge/HuggingFace/Output/FillMaskResultTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ public function testFromArrayWithVariousFormats()
168168

169169
$this->assertCount(3, $result->fills);
170170

171-
// Test edge cases are properly handled
172171
$this->assertSame(0, $result->fills[0]->token);
173172
$this->assertSame('', $result->fills[0]->tokenStr);
174173
$this->assertSame('', $result->fills[0]->sequence);

tests/Bridge/VertexAi/Contract/MessageBagNormalizerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ public function testNormalize(MessageBag $bag, array $expected)
6666
{
6767
$normalizer = new MessageBagNormalizer();
6868

69-
// Set up the inner normalizers
7069
$userMessageNormalizer = new UserMessageNormalizer();
7170
$assistantMessageNormalizer = new AssistantMessageNormalizer();
7271

73-
// Mock a normalizer that delegates to the appropriate concrete normalizer
7472
$mockNormalizer = $this->createMock(NormalizerInterface::class);
7573
$mockNormalizer->method('normalize')
7674
->willReturnCallback(function ($message) use ($userMessageNormalizer, $assistantMessageNormalizer): ?array {

tests/Bridge/VertexAi/Embeddings/ModelClientTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ final class ModelClientTest extends TestCase
3232
{
3333
public function testItGeneratesTheEmbeddingSuccessfully()
3434
{
35-
// Assert
3635
$expectedResponse = [
3736
'predictions' => [
3837
['embeddings' => ['values' => [0.3, 0.4, 0.4]]],
@@ -44,10 +43,8 @@ public function testItGeneratesTheEmbeddingSuccessfully()
4443

4544
$model = new Model(Model::GEMINI_EMBEDDING_001, ['outputDimensionality' => 1536, 'task_type' => TaskType::CLASSIFICATION]);
4645

47-
// Act
4846
$result = $client->request($model, 'test payload');
4947

50-
// Assert
5148
$this->assertSame($expectedResponse, $result->getData());
5249
}
5350
}

tests/Bridge/VertexAi/Embeddings/ResultConverterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ final class ResultConverterTest extends TestCase
3131
{
3232
public function testItConvertsAResponseToAVectorResult()
3333
{
34-
// Assert
3534
$expectedResponse = [
3635
'predictions' => [
3736
['embeddings' => ['values' => [0.3, 0.4, 0.4]]],

tests/Bridge/VertexAi/Gemini/ModelClientTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ final class ModelClientTest extends TestCase
2727
{
2828
public function testItInvokesTheTextModelsSuccessfully()
2929
{
30-
// Arrange
3130
$payload = [
3231
'content' => [
3332
['parts' => ['text' => 'Hello, world!']],
@@ -42,12 +41,10 @@ public function testItInvokesTheTextModelsSuccessfully()
4241

4342
$client = new ModelClient($httpClient, 'global', 'test');
4443

45-
// Act
4644
$result = $client->request(new Model(Model::GEMINI_2_0_FLASH), $payload);
4745
$data = $result->getData();
4846
$info = $result->getObject()->getInfo();
4947

50-
// Assert
5148
$this->assertNotEmpty($data);
5249
$this->assertNotEmpty($info);
5350
$this->assertSame('POST', $info['http_method']);

tests/Bridge/VertexAi/Gemini/ResultConverterTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ final class ResultConverterTest extends TestCase
2828
{
2929
public function testItConvertsAResponseToAVectorResult()
3030
{
31-
// Arrange
3231
$payload = [
3332
'content' => ['parts' => [['text' => 'Hello, world!']]],
3433
];
@@ -42,10 +41,8 @@ public function testItConvertsAResponseToAVectorResult()
4241

4342
$resultConverter = new ResultConverter();
4443

45-
// Act
4644
$result = $resultConverter->convert(new RawHttpResult($response));
4745

48-
// Assert
4946
$this->assertInstanceOf(TextResult::class, $result);
5047
$this->assertSame('Hello, world!', $result->getContent());
5148
}

tests/Bridge/VertexAi/TokenOutputProcessorTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public function testItDoesNothingWithoutRawResponse()
4848

4949
public function testItAddsUsageTokensToMetadata()
5050
{
51-
// Arrange
5251
$textResult = new TextResult('test');
5352

5453
$rawResponse = $this->createRawResponse([
@@ -64,10 +63,8 @@ public function testItAddsUsageTokensToMetadata()
6463
$processor = new TokenOutputProcessor();
6564
$output = $this->createOutput($textResult);
6665

67-
// Act
6866
$processor->processOutput($output);
6967

70-
// Assert
7168
$metadata = $output->result->getMetadata();
7269
$tokenUsage = $metadata->get('token_usage');
7370

@@ -81,7 +78,6 @@ public function testItAddsUsageTokensToMetadata()
8178

8279
public function testItHandlesMissingUsageFields()
8380
{
84-
// Arrange
8581
$textResult = new TextResult('test');
8682

8783
$rawResponse = $this->createRawResponse([
@@ -94,10 +90,8 @@ public function testItHandlesMissingUsageFields()
9490
$processor = new TokenOutputProcessor();
9591
$output = $this->createOutput($textResult);
9692

97-
// Act
9893
$processor->processOutput($output);
9994

100-
// Assert
10195
$metadata = $output->result->getMetadata();
10296
$tokenUsage = $metadata->get('token_usage');
10397

@@ -111,17 +105,14 @@ public function testItHandlesMissingUsageFields()
111105

112106
public function testItAddsEmptyTokenUsageWhenUsageMetadataNotPresent()
113107
{
114-
// Arrange
115108
$textResult = new TextResult('test');
116109
$rawResponse = $this->createRawResponse(['other' => 'data']);
117110
$textResult->setRawResult($rawResponse);
118111
$processor = new TokenOutputProcessor();
119112
$output = $this->createOutput($textResult);
120113

121-
// Act
122114
$processor->processOutput($output);
123115

124-
// Assert
125116
$metadata = $output->result->getMetadata();
126117
$tokenUsage = $metadata->get('token_usage');
127118

0 commit comments

Comments
 (0)