Completed
Push — master ( 7d1453...0dbf90 )
by Andrea
25:26 queued 23:30
created

GridDati::getResponse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
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