| Conditions | 2 |
| Paths | 2 |
| Total Lines | 25 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2.024 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 2 | public function process(\Swarrot\Broker\Message $message, array $options) |
|
| 33 | { |
||
| 34 | 2 | $message = $this->messageAdapterFactory->build($message); |
|
| 35 | |||
| 36 | 2 | $message = $this->onConsume($message); |
|
| 37 | |||
| 38 | 2 | $this->workerContext->getLogger()->debug((string) $message); |
|
| 39 | |||
| 40 | 2 | $this->onWorkerProcess(); |
|
| 41 | |||
| 42 | try |
||
| 43 | { |
||
| 44 | 2 | $processResult = $this->workerContext->getWorker()->process($message); |
|
| 45 | } |
||
| 46 | 2 | catch(\Exception $exception) |
|
| 47 | { |
||
| 48 | $this->onWorkerProcessed(); |
||
| 49 | |||
| 50 | throw $exception; |
||
| 51 | } |
||
| 52 | |||
| 53 | 2 | $this->onWorkerProcessed(); |
|
| 54 | |||
| 55 | 2 | return $processResult; |
|
| 56 | } |
||
| 57 | |||
| 68 |