| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 9 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 19 | { |
||
| 20 | 9 | $data = $request->getParsedBody(); |
|
| 21 | |||
| 22 | 9 | $user = $request->getAttribute(TokenMiddleware::USER_PARAM); |
|
| 23 | 9 | if ($user) { |
|
| 24 | 9 | $data[self::OWNER_PARAM] = $user; |
|
| 25 | } |
||
| 26 | |||
| 27 | 9 | return $handler->handle($request->withParsedBody($data)); |
|
| 28 | } |
||
| 29 | } |
||
| 30 |