| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | private function pullFromEntities(array $entities) |
||
| 48 | { |
||
| 49 | $events = []; |
||
| 50 | foreach ($entities as $entity) { |
||
| 51 | // ignore Doctrine proxy classes |
||
| 52 | // proxy class can't have a domain events |
||
| 53 | if (!($entity instanceof Proxy) && $entity instanceof AggregateEvents) { |
||
| 54 | $events = array_merge($events, $entity->pullEvents()); |
||
| 55 | } |
||
| 56 | } |
||
| 57 | |||
| 58 | return $events; |
||
| 59 | } |
||
| 60 | } |
||
| 61 |