Skip to content

Commit 382151b

Browse files
OskarStarkclaude
andcommitted
Remove internal loader and transformer options from Indexer
- Remove loader options parameter from loadSource() calls - Remove transformer options from transform() calls - Simplify loadSource() method signature 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3daee05 commit 382151b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/store/src/Indexer.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function index(null|string|array $source = null, array $options = []): vo
4242
$sources = null === $source ? [null] : (array) $source;
4343
$documents = [];
4444
foreach ($sources as $singleSource) {
45-
$loadedDocuments = $this->loadSource($singleSource, $options['loader'] ?? []);
45+
$loadedDocuments = $this->loadSource($singleSource);
4646
$documents = array_merge($documents, $loadedDocuments);
4747
}
4848

@@ -54,7 +54,7 @@ public function index(null|string|array $source = null, array $options = []): vo
5454

5555
// Transform documents through all transformers
5656
foreach ($this->transformers as $transformer) {
57-
$documents = $transformer->transform($documents, $options['transformer'] ?? []);
57+
$documents = $transformer->transform($documents);
5858
}
5959

6060
// Vectorize and store documents in chunks
@@ -79,13 +79,11 @@ public function index(null|string|array $source = null, array $options = []): vo
7979
}
8080

8181
/**
82-
* @param array<string, mixed> $options
83-
*
8482
* @return TextDocument[]
8583
*/
86-
private function loadSource(null|string $source, array $options): array
84+
private function loadSource(null|string $source): array
8785
{
88-
$loadedDocuments = $this->loader->load($source, $options);
86+
$loadedDocuments = $this->loader->load($source);
8987
$documents = [];
9088

9189
foreach ($loadedDocuments as $document) {

0 commit comments

Comments
 (0)