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

GridTestata   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 21
ccs 8
cts 10
cp 0.8
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 2
A getResponse() 0 4 1
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