| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 13 | abstract class AbstractConsumer implements ConsumerInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var \Jellyfish\QueueRabbitMq\ConnectionInterface |
||
| 17 | */ |
||
| 18 | protected $connection; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \Jellyfish\Queue\MessageMapperInterface |
||
| 22 | */ |
||
| 23 | protected $messageMapper; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param \Jellyfish\QueueRabbitMq\ConnectionInterface $connection |
||
| 27 | * @param \Jellyfish\Queue\MessageMapperInterface $messageMapper |
||
| 28 | */ |
||
| 29 | public function __construct( |
||
| 30 | ConnectionInterface $connection, |
||
| 31 | MessageMapperInterface $messageMapper |
||
| 32 | ) { |
||
| 33 | $this->connection = $connection; |
||
| 34 | $this->messageMapper = $messageMapper; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param \Jellyfish\Queue\DestinationInterface $destination |
||
| 39 | * @return \Jellyfish\Queue\MessageInterface|null |
||
| 40 | */ |
||
| 41 | protected function doReceiveMessage(DestinationInterface $destination): ?MessageInterface |
||
| 50 | } |
||
| 51 | } |
||
| 52 |