Total Complexity | 5 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
9 | final class EventCollector implements EventBag |
||
10 | { |
||
11 | private $events = []; |
||
12 | |||
13 | public function add(DomainEvent ...$events): void |
||
14 | { |
||
15 | foreach ($events as $event) { |
||
16 | $this->events[] = $event; |
||
17 | } |
||
18 | } |
||
19 | |||
20 | public function takeFrom(DomainEventRecorder $recorder): void |
||
24 | } |
||
25 | |||
26 | public function clear(): void |
||
27 | { |
||
28 | $this->events = []; |
||
29 | } |
||
30 | |||
31 | public function all(): iterable |
||
34 | } |
||
35 | } |
||
36 |