| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function onFlush(OnFlushEventArgs $eventArgs) : void |
||
| 27 | { |
||
| 28 | $domainEvents = $this->getDomainsEvents($eventArgs); |
||
| 29 | |||
| 30 | $outboxEvents = $this->convert($this->conversionMap, ...$domainEvents); |
||
| 31 | |||
| 32 | if (empty($outboxEvents)) { |
||
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | $this->persist($eventArgs->getEntityManager(), $this->outboxMappedSuperclass, ...$outboxEvents); |
||
| 37 | } |
||
| 39 |