| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | trait EventRecorderCapabilities |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var EventInterface[] |
||
| 19 | */ |
||
| 20 | private $recordedEvents; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return mixed |
||
| 24 | */ |
||
| 25 | public function clear() |
||
| 26 | { |
||
| 27 | $this->recordedEvents = []; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param EventInterface $event |
||
| 32 | * |
||
| 33 | * @return mixed |
||
| 34 | */ |
||
| 35 | public function record(EventInterface $event) |
||
| 36 | { |
||
| 37 | $eventUuid = $event->uuid(); |
||
| 38 | $this->recordedEvents[(string) $eventUuid] = $event; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return EventInterface[] |
||
| 43 | */ |
||
| 44 | public function releaseEvents() |
||
| 50 | } |
||
| 51 | } |
||
| 52 |