| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 3 | public function process( |
|
| 32 | ServerRequestInterface $request, |
||
| 33 | RequestHandlerInterface $handler |
||
| 34 | ): ResponseInterface { |
||
| 35 | 3 | if ($request->getUri()->getPath() !== $this->config->getAuthorizationPath()) { |
|
| 36 | 1 | return $handler->handle($request); |
|
| 37 | } |
||
| 38 | |||
| 39 | 2 | if ($this->broadcast->authorize($request)) { |
|
| 40 | 1 | return $this->responseFactory->createResponse(200); |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | return $this->responseFactory->createResponse(403); |
|
| 44 | } |
||
| 46 |