Skip to content

Commit 65e892a

Browse files
mikadamczykGrabowskiM
authored andcommitted
Added type hinting and improve assertions in tests
1 parent 2a430a3 commit 65e892a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/lib/Search/Common/FieldValueMapper/EmbeddingMapper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public function canMap(Field $field): bool
2222
return $field->getType() instanceof EmbeddingField;
2323
}
2424

25+
/**
26+
* @return mixed
27+
*/
2528
public function map(Field $field)
2629
{
2730
return $field->getValue();

tests/integration/Core/Search/FieldType/EmbeddingFieldFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testCreateWithCustomType(): void
3838
{
3939
$config = $this->createMock(EmbeddingConfigurationInterface::class);
4040
$config
41-
->expects($this->never())
41+
->expects(self::never())
4242
->method('getDefaultModelFieldSuffix');
4343

4444
$factory = new EmbeddingFieldFactory($config);

tests/lib/Search/Embedding/EmbeddingProviderRegistryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testGetEmbeddingProviders(): void
6060

6161
$embeddingProviders = $registry->getEmbeddingProviders();
6262

63-
$this->assertIsArray(
63+
self::assertIsArray(
6464
$embeddingProviders,
6565
'getProviders() should return an array of embedding providers'
6666
);

0 commit comments

Comments
 (0)