| Conditions | 2 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2.032 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 1 | public function createResponse(): Response |
|
| 32 | { |
||
| 33 | try { |
||
| 34 | 1 | $response = $this->psrResponder->createResponse(); |
|
| 35 | |||
| 36 | 1 | $symfonyResponse = new Response( |
|
| 37 | 1 | (string) $response->getBody(), |
|
| 38 | 1 | $response->getStatusCode(), |
|
| 39 | 1 | $response->getHeaders() |
|
| 40 | ); |
||
| 41 | } catch (\Exception $exception) { |
||
| 42 | throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, null, $exception); |
||
| 43 | } |
||
| 44 | |||
| 45 | 1 | $symfonyResponse->setPrivate(); |
|
| 46 | |||
| 47 | 1 | return $symfonyResponse; |
|
| 48 | } |
||
| 50 |