TestController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 1
c 2
b 0
f 2
lcom 0
cbo 3
dl 0
loc 20
ccs 0
cts 10
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A showTestAction() 0 13 1
1
<?php
2
3
namespace AppBundle\Controller\Test;
4
5
use AppBundle\Entity\ModuleUser;
6
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
8
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
9
10
11
/**
12
 * Class TestController
13
 * @package AppBundle\Controller\Test
14
 */
15
class TestController extends Controller
16
{
17
    /**
18
     * @Route("/test", name="show_test")
19
     * @Template("@App/test/test.html.twig")
20
     */
21
    public function showTestAction()
22
    {
23
        $user = $this->getUser();
24
25
        $em = $this->getDoctrine()->getManager();
26
27
        $modules = $em->getRepository('AppBundle:ModuleUser')
28
            ->findModuleUserActive($user);
29
30
        return [
31
            'modules' => $modules
32
        ];
33
    }
34
}
35