| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function consumeEvent(PostTransformEvent $event): void |
||
| 30 | { |
||
| 31 | $this->buildProperty( |
||
| 32 | $event, |
||
| 33 | ProductInterface::class, |
||
| 34 | function (ProductInterface $product, Document $document): void { |
||
| 35 | /** @var ProductTranslationInterface $productTranslation */ |
||
| 36 | foreach ($product->getTranslations() as $productTranslation) { |
||
| 37 | $propertyName = $this->productNameNameResolver->resolvePropertyName($productTranslation->getLocale()); |
||
| 38 | |||
| 39 | $document->set($propertyName, $productTranslation->getName()); |
||
| 40 | } |
||
| 45 |