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