| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | trait EventGeneratorMethods |
||
| 20 | { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var Event[] |
||
| 24 | */ |
||
| 25 | protected $events = []; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Record ane event that occurs |
||
| 29 | * |
||
| 30 | * @param Object $event |
||
| 31 | */ |
||
| 32 | public function recordThat(Object $event): void |
||
| 33 | { |
||
| 34 | $this->events[] = $event; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Releases all recorded events |
||
| 39 | * |
||
| 40 | * @return Event[] |
||
| 41 | */ |
||
| 42 | public function releaseEvents(): array |
||
| 47 | } |
||
| 48 | } |
||
| 49 |