| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function consumeEvent(TransformEvent $event): void |
||
| 38 | { |
||
| 39 | $this->buildProperty($event, ProductInterface::class, |
||
| 40 | function (ProductInterface $product, Document $document): void { |
||
| 41 | $channels = []; |
||
| 42 | |||
| 43 | foreach ($product->getChannels() as $channel) { |
||
| 44 | $channels[] = $channel->getCode(); |
||
| 45 | } |
||
| 46 | |||
| 47 | $document->set($this->channelsProperty, $channels); |
||
| 48 | } |
||
| 52 |