Lines
0.00%
0 / 3
Methods
0.00%
0 / 3
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| handledMessageClass | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| handle | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| 13 | final readonly class StateUpdateBatchHandler implements BrokerMessageHandler | |
| 14 | { | |
| 15 | public function __construct( | |
| 16 | private StateCacheSync $stateCacheSync, | |
| 17 | private LocalDispatcher $dispatcher, | |
| 18 | ) {} | |
| 19 | ||
| 20 | public function handledMessageClass(): string | |
| 21 | { | |
| 22 | return StateUpdateBatch::class; | |
| 23 | } | |
| 24 | ||
| 25 | /** @param StateUpdateBatch $message */ | |
| 26 | public function handle(BrokerMessage $message): void | |
| 27 | { | |
| 28 | $this->dispatcher->dispatchStateChanges($this->stateCacheSync->applyStateUpdates($message->updates->collection)); | |
| 29 | } | |
| 30 | } |