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