Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public static function reconstituteFromEvents(AggregateRootId $aggregateRootId, Generator $events): AggregateRoot |
||
16 | { |
||
17 | $aggregateRoot = static::defaultAggregateRootReconstitute($aggregateRootId, $events); |
||
18 | |||
19 | if (0 === $aggregateRoot->aggregateRootVersion()) { |
||
20 | throw new InvalidAggregateRootReconstitutionException(); |
||
21 | } |
||
22 | |||
23 | return $aggregateRoot; |
||
24 | } |
||
26 |