Conditions | 5 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
20 | public function handle(ServerRequestInterface $request): ResponseInterface |
||
21 | { |
||
22 | $queryParams = $request->getQueryParams(); |
||
23 | |||
24 | $tasks = ServiceContainer::getInstance() |
||
25 | ->queue |
||
26 | ->search( |
||
27 | isset($queryParams['profile']) ? new Profile($queryParams['profile']) : null, |
||
28 | isset($queryParams['status']) ? new Status($queryParams['status']) : null, |
||
29 | isset($queryParams['tags']) ? (array) $queryParams['tags'] : [], |
||
30 | isset($queryParams['order']) ? $queryParams['order'] : 'status' |
||
31 | ); |
||
32 | |||
33 | return new JsonResponse($tasks); |
||
34 | } |
||
36 |