| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 28 | 
| Code Lines | 22 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 39 | public function getGroupRoles(ServerRequestInterface $request, ResponseInterface $response, $args) | ||
| 40 |     { | ||
| 41 |         $this->logger->info("Fetch group roles GET '/group/".$args['id']."/roles'"); | ||
| 42 | $events = EventQuery::create() | ||
| 43 | ->useEventPersonQuery() | ||
| 44 | ->useUserRoleQuery() | ||
| 45 | ->useRoleQuery() | ||
| 46 | ->filterByGroupId($args['id']) | ||
| 47 | ->endUse() | ||
| 48 | ->endUse() | ||
| 49 | ->endUse() | ||
| 50 | ->filterByDate(['min' => new DateTime()]) | ||
| 51 | ->filterByRemoved(false) | ||
| 52 |             ->orderByDate('asc') | ||
| 53 | ->distinct() | ||
| 54 | ->find(); | ||
| 55 | |||
| 56 | $group = GroupQuery::create() | ||
| 57 | ->useRoleQuery() | ||
| 58 | ->endUse() | ||
| 59 | ->distinct() | ||
| 60 | ->findPk($args['id']); | ||
| 61 | |||
| 62 | // temporary redirect | ||
| 63 |         return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home').'old/roles.php'); | ||
| 64 | |||
| 65 | return $this->view->render($response, 'group-roles.twig', ['events' => $events, 'group' => $group]); | ||
| 66 | } | ||
| 67 | } | ||
| 68 | 
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.