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

GridTestata::__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
use Fi\CoreBundle\DependencyInjection\JqgridDati;
6
use Fi\CoreBundle\DependencyInjection\JqgridTestata;
7
8
/**
9
 * Description of Jqgrid.
10
 *
11
 * @author manzolo
12
 */
13
class GridTestata
14
{
15
16
    private $grid;
17
18 13
    public function __construct($testata)
19
    {
20 13
        if (isset($testata["gridtype"])) {
21
            $gridtype = $testata["gridtype"];
22
        } else {
23 13
            $gridtype = 'Jqgrid';
24
        }
25 13
        $class = '\\Fi\\CoreBundle\\DependencyInjection\\' . $gridtype . "Testata";
26 13
        $this->grid = new $class($testata);
27 13
    }
28
29 13
    public function getResponse()
30
    {
31 13
        return $this->grid->getResponse();
32
    }
33
}
34