Passed
Push — master ( 17e906...d315bd )
by Andrea
40:07 queued 35:20
created

OpzioniTabellaController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 100
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 100
ccs 0
cts 80
cp 0
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
B setParametriGriglia() 0 24 2
A indexAction() 0 68 1
1
<?php
2
3
/* Qui Bundle */
4
//namespace Fi\DemoBundle\Controller;
5
6
namespace Fi\CoreBundle\Controller;
7
8
use Symfony\Component\HttpFoundation\Request;
9
10
/**
11
 * OpzioniTabella controller.
12
 */
13
class OpzioniTabellaController extends FiCoreController
14
{
15
16
    /**
17
     * Lists all opzioniTabella entities.
18
     */
19
    public function indexAction(Request $request)
20
    {
21
        /* @var $em \Doctrine\ORM\EntityManager */
22
        $this->setup($request);
23
        $namespace = $this->getNamespace();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
24
        $bundle = $this->getBundle();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
25
        $controller = $this->getController();
26
        $container = $this->container;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
27
28
        $nomebundle = $namespace . $bundle . 'Bundle';
29
30
        $dettaglij = array(
31
            'descrizione' => array(
32
                array(
33
                    'nomecampo' => 'descrizione',
34
                    'lunghezza' => '400',
35
                    'descrizione' => 'Descrizione',
36
                    'tipo' => 'text',),),
37
            'parametro' => array(
38
                array(
39
                    'nomecampo' => 'parametro',
40
                    'lunghezza' => '300',
41
                    'descrizione' => 'Parametro',
42
                    'tipo' => 'text',),),
43
            'valore' => array(
44
                array(
45
                    'nomecampo' => 'valore',
46
                    'lunghezza' => '300',
47
                    'descrizione' => 'Valore',
48
                    'tipo' => 'text',),),
49
            'tabelle_id' => array(
50
                array(
51
                    'nomecampo' => 'tabelle.nometabella',
52
                    'lunghezza' => '400',
53
                    'descrizione' => 'Tabella',
54
                    'tipo' => 'text',),
55
            ),
56
        );
57
58
        $escludi = array();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
59
        $paricevuti = array(
60
            'nomebundle' => $nomebundle,
61
            'nometabella' => $controller,
62
            'dettaglij' => $dettaglij,
63
            'escludere' => $escludi,
64
            'container' => $container,
65
        );
66
67
        $testatagriglia = Griglia::testataPerGriglia($paricevuti);
68
69
        $testatagriglia['multisearch'] = 1;
70
        $testatagriglia['showconfig'] = 1;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
71
        $testatagriglia['showadd'] = 1;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
72
        $testatagriglia['showedit'] = 1;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
73
        $testatagriglia['showdel'] = 1;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
74
        $testatagriglia['editinline'] = 0;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
75
76
        $testatagriglia['parametritesta'] = json_encode($paricevuti);
77
        $this->setParametriGriglia(array('request' => $request));
78
        $testatagriglia['parametrigriglia'] = json_encode(self::$parametrigriglia);
79
80
        $testata = json_encode($testatagriglia);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
81
        $twigparms = array(
82
            'nomecontroller' => $controller,
83
            'testata' => $testata,
84
        );
85
86
        return $this->render($nomebundle . ':' . $controller . ':index.html.twig', $twigparms);
87
    }
88
89
    public function setParametriGriglia($prepar = array())
90
    {
91
        $this->setup($prepar['request']);
92
        $namespace = $this->getNamespace();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
93
        $bundle = $this->getBundle();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
94
        $controller = $this->getController();
95
96
        $nomebundle = $namespace . $bundle . 'Bundle';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 13 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
97
        $escludi = array();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 16 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
98
        $tabellej = array();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 15 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
99
        $tabellej['tabelle_id'] = array('tabella' => 'tabelle', 'campi' => array('nometabella'));
100
101
        $paricevuti = array(
102
            'container' => $this->container,
103
            'nomebundle' => $nomebundle,
104
            'tabellej' => $tabellej,
105
            'nometabella' => $controller,
106
            'escludere' => $escludi,);
107
108
        if (! empty($prepar)) {
109
            $paricevuti = array_merge($paricevuti, $prepar);
110
        }
111
112
        self::$parametrigriglia = $paricevuti;
113
    }
114
}
115