Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public static function unexpectedVersionAlreadyPersisted( |
||
11 | AggregateRoot $aggregateRoot, |
||
12 | string $uuid, |
||
13 | int $expectedVersion, |
||
14 | int $actualVersion |
||
15 | ) { |
||
16 | $aggregateRootClass = class_basename($aggregateRoot); |
||
17 | |||
18 | return new static("Could not persist aggregate {$aggregateRootClass} (uuid: {$uuid}) because it seems to be changed by another process after it was retrieved in the current process. Expect to persist events after version {$expectedVersion}, but version {$actualVersion} was already persisted."); |
||
19 | } |
||
20 | } |
||
21 |