Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
17 | * @param ServerRequestInterface $request |
||
18 | * @param ResponseInterface $response |
||
19 | * @param callable $next |
||
20 | * @return mixed |
||
21 | */ |
||
22 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) |
||
23 | { |
||
24 | if (!preg_match('/access_token/', $request->getUri()->getQuery())) { |
||
25 | return $response->errorUnauthorized(); |
||
30 | } |