| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 2 | public function onFlush(OnFlushEventArgs $eventArgs) : void |
|
| 27 | { |
||
| 28 | 2 | $unitOfWork = $eventArgs->getEntityManager() |
|
| 29 | 2 | ->getUnitOfWork(); |
|
| 30 | |||
| 31 | 2 | $events = []; |
|
| 32 | |||
| 33 | 2 | foreach (self::getEventAwareEntities($unitOfWork) as $entity) { |
|
| 34 | 1 | $events += $entity->expelRecordedEvents(); |
|
| 35 | } |
||
| 36 | |||
| 37 | 2 | ksort($events); |
|
| 38 | |||
| 39 | 2 | Counter::reset(); |
|
| 40 | 2 | $this->eventsAggregator->aggregate(...$events); |
|
| 41 | 2 | } |
|
| 59 |