Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | */ |
||
37 | public function consumeEvent(TransformEvent $event): void |
||
38 | { |
||
39 | $this->buildProperty($event, ProductInterface::class, |
||
40 | function (ProductInterface $product, Document $document): void { |
||
41 | $createdAt = (int)$product->getCreatedAt()->format('U'); |
||
42 | |||
43 | $document->set($this->createdAtProperty, $createdAt); |
||
44 | } |
||
45 | ); |
||
46 | } |
||
47 | } |
||
48 |