Skip to content

Commit 4c279f6

Browse files
committed
key by class
1 parent 09bfc14 commit 4c279f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Repository/IndexRepository.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
*/
1414
class IndexRepository
1515
{
16-
public function __construct(protected array $indices)
16+
protected array $indices;
17+
public function __construct(array $indices)
1718
{
19+
foreach ($indices as $index) {
20+
$this->indices[$index::class] = $index;
21+
}
1822
}
1923

2024
/**

0 commit comments

Comments
 (0)