| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function accept(ReflectionClass $class, Entity $entity, $annotation): void |
||
| 17 | { |
||
| 18 | if (!($annotation instanceof Document)) { |
||
| 19 | return; |
||
| 20 | } |
||
| 21 | $target = $entity->getIndexing() ? Indexing::from($entity->getIndexing()) : new Indexing(); |
||
| 22 | $target |
||
| 23 | ->setWriteIndices($annotation->writeIndices) |
||
| 24 | ->setReadIndices($annotation->readIndices) |
||
| 25 | ->setType($annotation->type); |
||
| 26 | $entity->setIndexing($target); |
||
| 27 | } |
||
| 29 |