Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| DirectIndexStrategy | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| updateIndex | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\DoctrineEntityDatalayer\IndexStrategy; |
| 3 | |
| 4 | use Apie\Core\Entities\EntityInterface; |
| 5 | use Apie\DoctrineEntityDatalayer\EntityReindexer; |
| 6 | use Apie\StorageMetadataBuilder\Interfaces\HasIndexInterface; |
| 7 | |
| 8 | class DirectIndexStrategy implements IndexStrategyInterface |
| 9 | { |
| 10 | public function __construct(private readonly EntityReindexer $entityReindexer) |
| 11 | { |
| 12 | } |
| 13 | |
| 14 | public function updateIndex( |
| 15 | HasIndexInterface $doctrineEntity, |
| 16 | EntityInterface $entity |
| 17 | ): void { |
| 18 | $this->entityReindexer->updateIndex($doctrineEntity, $entity); |
| 19 | } |
| 20 | } |