GridDati::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2.0185

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 9
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2.0185
1
<?php
2
3
namespace Fi\CoreBundle\Utils;
4
5
/**
6
 * Description of Jqgrid.
7
 *
8
 * @author manzolo
9
 */
10
class GridDati
11
{
12
13
    private $grid;
14
15 6
    public function __construct($testata)
16
    {
17 6
        if (isset($testata["gridtype"])) {
18
            $gridtype = $testata["gridtype"];
19
        } else {
20 6
            $gridtype = 'Jqgrid';
21
        }
22 6
        $class = '\\Fi\\CoreBundle\\Utils\\' . $gridtype . "Dati";
23 6
        $this->grid = new $class($testata);
24 6
    }
25
26 6
    public function getResponse()
27
    {
28 6
        return $this->grid->getResponse();
29
    }
30
}
31