Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function setAggregateRootId($aggregateRootId) |
||
21 | { |
||
22 | if (null !== $this->aggregateRootId && $aggregateRootId !== $this->aggregateRootId) { |
||
23 | $eventName = new EventName($this); |
||
24 | throw new RuntimeException( |
||
25 | sprintf( |
||
26 | 'Event %s: The aggregate root id is already set and is different from the one given.', |
||
27 | $eventName |
||
28 | ) |
||
29 | ); |
||
30 | } |
||
31 | |||
32 | $this->aggregateRootId = $aggregateRootId; |
||
33 | } |
||
34 | |||
43 |