Lines
100.00%
5 / 5
Methods
100.00%
1 / 1
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| follow | 100.00% | 5 / 5 | 100.00% | 1 / 1 | 3 | ||
| 11 | final readonly class StatsTracking | |
| 12 | { | |
| 13 | public static function follow(Stats $stats, Event $event): bool | |
| 14 | { | |
| 15 | if (!$event instanceof HeroStatsUpdatedEvent) { | |
| 16 | return false; | |
| 17 | } | |
| 18 | ||
| 19 | foreach ($event->stats as $stat) { | |
| 20 | $stats->update($stat); | |
| 21 | } | |
| 22 | ||
| 23 | return true; | |
| 24 | } | |
| 25 | } |