Total Complexity | 4 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
5 | trait DomainEventRecording |
||
6 | { |
||
7 | /** @var iterable|DomainEvent[] */ |
||
8 | protected $events = []; |
||
9 | |||
10 | private function happened(DomainEvent ...$newEvents): void |
||
14 | } |
||
15 | } |
||
16 | |||
17 | /** @return DomainEvent[] */ |
||
18 | public function domainEvents(): iterable |
||
19 | { |
||
20 | return $this->events; |
||
|
|||
21 | } |
||
22 | |||
23 | public function eraseEvents(): void |
||
26 | } |
||
27 | } |
||
28 |