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