Completed
Push — master ( 2ff726...1b8ace )
by Andrea
09:31
created

GridDati::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2.0625

Importance

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