| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | class Client implements EventConsumerClient |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var EventProcessor |
||
| 26 | */ |
||
| 27 | private $eventProcessor; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var CommandConsumerClient |
||
| 31 | */ |
||
| 32 | private $commandConsumer; |
||
| 33 | |||
| 34 | public function __construct( |
||
| 35 | EventProcessor $eventProcessor, |
||
| 36 | CommandConsumerClient $commandConsumer |
||
| 37 | ) { |
||
| 38 | $this->eventProcessor = $eventProcessor; |
||
| 39 | $this->commandConsumer = $commandConsumer; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param Event $event |
||
| 44 | * @throws UnprocessableEventException if event (payload) have invalid structure. |
||
| 45 | */ |
||
| 46 | public function consume(Event $event): void |
||
| 50 | } |
||
| 51 | } |
||
| 53 |