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