Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
19 | 1 | public function adminAction() |
|
20 | { |
||
21 | 1 | $em = $this->getDoctrine()->getManager(); |
|
22 | |||
23 | 1 | $countUsers = $em->getRepository('AppBundle:User')->findCountUsers(); |
|
24 | 1 | $countModules = $em->getRepository('AppBundle:Module')->findCountModules(); |
|
25 | 1 | $countCategories = $em->getRepository('AppBundle:Category')->findCountCategories(); |
|
26 | 1 | $countQuestions = $em->getRepository('AppBundle:Question')->findCountQuestions(); |
|
27 | |||
28 | return [ |
||
29 | 1 | 'count_users' => $countUsers['count_u'], |
|
30 | 1 | 'count_modules' => $countModules['count_m'], |
|
31 | 1 | 'count_categories' => $countCategories['count_c'], |
|
32 | 1 | 'count_questions' => $countQuestions['count_q'] |
|
33 | 1 | ]; |
|
34 | } |
||
35 | } |
||
36 |