Skip to content

Commit 4a40496

Browse files
committed
[Store] Add documentation to InMemoryLoader class
Add description explaining that InMemoryLoader returns pre-loaded TextDocuments from memory and is useful for testing or when documents are already available as objects. Also update parameter type annotation from array<TextDocument> to TextDocument[] for better readability.
1 parent afae66e commit 4a40496

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/store/src/Document/Loader/InMemoryLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
use Symfony\AI\Store\Document\TextDocument;
1616

1717
/**
18+
* Loader that returns pre-loaded TextDocuments from memory.
19+
* Useful for testing or when documents are already available as objects.
20+
*
1821
* @author Oskar Stark <[email protected]>
1922
*/
2023
final readonly class InMemoryLoader implements LoaderInterface
2124
{
2225
/**
23-
* @param array<TextDocument> $documents
26+
* @param TextDocument[] $documents
2427
*/
2528
public function __construct(
2629
private array $documents = [],

0 commit comments

Comments
 (0)