| Conditions | 2 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function consumeEvent(TransformEvent $event): void |
||
| 40 | { |
||
| 41 | $this->buildProperty($event, ProductInterface::class, |
||
| 42 | function (ProductInterface $product, Document $document): void { |
||
| 43 | /** @var ProductTranslationInterface $productTranslation */ |
||
| 44 | foreach ($product->getTranslations() as $productTranslation) { |
||
| 45 | $propertyName = $this->productNameNameResolver->resolvePropertyName($productTranslation->getLocale()); |
||
| 46 | |||
| 47 | $document->set($propertyName, $productTranslation->getName()); |
||
| 48 | } |
||
| 53 |