Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | trait EventAwareTrait |
||
23 | { |
||
24 | /** |
||
25 | * @var EventInterface[] |
||
26 | */ |
||
27 | private $events = []; |
||
28 | |||
29 | /** |
||
30 | * Registers that $event occurred |
||
31 | */ |
||
32 | public function recordThat(EventInterface $event): void |
||
33 | { |
||
34 | $this->events[] = $event; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return EventInterface[] of occurred events |
||
39 | */ |
||
40 | public function releaseEvents(): array |
||
46 | } |
||
47 | |||
48 | public function hasEvents(): bool |
||
53 |