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