Skip to content

Commit 7f6d058

Browse files
committed
fix phpStan
1 parent fd0b94c commit 7f6d058

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/store/src/Bridge/ChromaDb/Store.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ final class Store implements StoreInterface
2727
public function __construct(
2828
private readonly Client $client,
2929
private readonly string $collectionName,
30-
) {
30+
)
31+
{
3132
if (!class_exists(Client::class)) {
3233
throw new RuntimeException('For using the ChromaDB as retrieval vector store, the codewithkyrian/chromadb-php package is required. Try running "composer require codewithkyrian/chromadb-php".');
3334
}
@@ -40,7 +41,7 @@ public function add(VectorDocument ...$documents): void
4041
$metadata = [];
4142
$originalDocuments = [];
4243
foreach ($documents as $document) {
43-
$ids[] = (string) $document->id;
44+
$ids[] = (string)$document->id;
4445
$vectors[] = $document->vector->getData();
4546
$metadataCopy = $document->metadata->getArrayCopy();
4647
$originalDocuments[] = $document->metadata->getText() ?? '';
@@ -57,7 +58,7 @@ public function add(VectorDocument ...$documents): void
5758
*/
5859
public function query(Vector $vector, array $options = []): array
5960
{
60-
$include ??= ['embeddings', 'metadatas', 'distances'];
61+
$include = ['embeddings', 'metadatas', 'distances'];
6162
if ([] !== ($options['include'] ?? [])) {
6263
$include = array_values(
6364
array_unique(

0 commit comments

Comments
 (0)