Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function shiftEvent(AggregateRootInterface &$aggregateRoot) : ?EventInterface |
||
30 | { |
||
31 | /** @var AggregateRoot $aggregateRoot */ |
||
32 | $events = $aggregateRoot->getRecordedEvents(); |
||
33 | $event = array_shift($events); |
||
34 | if (! empty($event)) { |
||
35 | $this->writeProperty($aggregateRoot, 'recordedEvents', $events); |
||
36 | } |
||
37 | return $event; |
||
38 | } |
||
40 |