| Total Complexity | 13 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class InMemoryMessageRepository implements MessageRepository |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Message[] |
||
| 13 | */ |
||
| 14 | private $messages = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var object[] |
||
| 18 | */ |
||
| 19 | private $lastCommit = []; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @return object[] |
||
| 23 | */ |
||
| 24 | 8 | public function lastCommit(): array |
|
| 25 | { |
||
| 26 | 8 | return $this->lastCommit; |
|
| 27 | } |
||
| 28 | |||
| 29 | 8 | public function purgeLastCommit(): void |
|
| 32 | 8 | } |
|
| 33 | |||
| 34 | 9 | public function persist(Message ...$messages): void |
|
| 42 | } |
||
| 43 | 9 | } |
|
| 44 | |||
| 45 | 8 | public function retrieveAll(AggregateRootId $id): Generator |
|
| 57 | } |
||
| 58 | |||
| 59 | public function retrieveAllAfterVersion(AggregateRootId $id, int $aggregateRootVersion): Generator |
||
| 74 |