| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2.0054 |
| Changes | 8 | ||
| Bugs | 0 | Features | 5 |
| 1 | <?php |
||
| 18 | 1 | public function showAccountAction(Request $request) |
|
|
|
|||
| 19 | { |
||
| 20 | 1 | if ($this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')) { |
|
| 21 | return $this->redirectToRoute('admin'); |
||
| 22 | } |
||
| 23 | |||
| 24 | 1 | $user = $this->getUser(); |
|
| 25 | 1 | $em = $this->getDoctrine()->getManager(); |
|
| 26 | |||
| 27 | 1 | $modules = $em->getRepository('AppBundle:ModuleUser') |
|
| 28 | 1 | ->findModules($user); |
|
| 29 | |||
| 30 | return [ |
||
| 31 | 1 | 'user' => $user, |
|
| 32 | 'modules' => $modules |
||
| 33 | 1 | ]; |
|
| 34 | } |
||
| 35 | } |
||
| 36 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.