| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | abstract class AggregateRoot implements RaiseEventsInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var DomainEventInterface[] |
||
| 11 | */ |
||
| 12 | protected array $events = []; |
||
| 13 | |||
| 14 | public function popEvents(): array |
||
| 15 | { |
||
| 16 | $events = $this->events; |
||
| 17 | $this->events = []; |
||
| 18 | |||
| 19 | return $events; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function clearEvents(): void |
||
| 25 | } |
||
| 26 | |||
| 27 | public function raise(DomainEventInterface $event): void |
||
| 32 |