StoricomodificheController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 16
dl 0
loc 27
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A modificheAction() 0 24 1
1
<?php
2
3
namespace Fi\CoreBundle\Controller;
4
5
use Symfony\Component\HttpFoundation\Request;
6
7
/**
8
 * Storicomodifiche controller.
9
 *
10
 */
11
class StoricomodificheController extends FiCoreController
12
{
13
14
    public function modificheAction(Request $request)
15
    {
16
        $nometabella = $request->get("nometabella");
17
        $nomecampo = $request->get("nomecampo");
18
        $id = (int) $request->get("id");
19
20
        $this->setup($request);
21
        $namespace = $this->getNamespace();
22
        $bundle = $this->getBundle();
23
        $controller = $this->getController();
24
25
        $nomebundle = $namespace . $bundle . 'Bundle';
26
27
        $em = $this->getDoctrine()->getManager();
28
29
        $entity = $em->getRepository($nomebundle . ':' . $controller)->findBy(
30
            array(
31
                    'nometabella' => $nometabella,
32
                    'nomecampo' => $nomecampo,
33
                    'idtabella' => $id,
34
                )
35
        );
36
37
        return $this->render('FiCoreBundle:Storicomodifiche:modifiche.html.twig', array("modifiche" => $entity));
38
    }
39
}
40