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