Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | public function apply(AggregateChanged $aggregateChanged): void |
||
50 | { |
||
51 | /** @var array<string, string> */ |
||
52 | $eventMap = static::EVENT_MAP; |
||
53 | $eventClass = get_class($aggregateChanged); |
||
54 | if (array_key_exists($eventClass, $eventMap)) { |
||
55 | $method = $eventMap[$eventClass]; |
||
56 | $this->{$method}($aggregateChanged); |
||
57 | } |
||
60 |