Conditions | 4 |
Paths | 16 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.128 |
Changes | 0 |
1 | <?php |
||
48 | 2 | protected function main(): ResponseInterface |
|
49 | { |
||
50 | try { |
||
51 | 2 | $pipe = new MiddlewarePipe(); |
|
52 | 2 | if (isset($this->requestContext)) { |
|
53 | 2 | $pipe->append($this->requestContext); |
|
|
|||
54 | } |
||
55 | 2 | if (isset($this->eventsHub)) { |
|
56 | 2 | $pipe->append($this->eventsHub); |
|
57 | } |
||
58 | 2 | $pipe->append($this->middlewarePipe); |
|
59 | |||
60 | 2 | return $pipe->process($this->request, $this->businessLogicHandler); |
|
61 | } catch (ThrowableResponseInterface $e) { |
||
62 | return $e->getResponse(); |
||
63 | } |
||
66 |