| Conditions | 2 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function consumeEvent(TransformEvent $event): void |
||
| 21 | { |
||
| 22 | $this->buildProperty($event, ProductInterface::class, |
||
| 23 | function (ProductInterface $product, Document $document): void { |
||
| 24 | $mainTaxon = $product->getMainTaxon(); |
||
| 25 | |||
| 26 | if (null === $mainTaxon) { |
||
| 27 | return; |
||
| 28 | } |
||
| 29 | |||
| 30 | $document->set( |
||
| 31 | $this->taxonPositionNameResolver->resolvePropertyName($mainTaxon->getCode()), |
||
|
|
|||
| 32 | $mainTaxon->getPosition() |
||
| 33 | ); |
||
| 38 |