Custom   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getFormControl() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Grido (https://github.com/o5/grido)
5
 *
6
 * Copyright (c) 2011 Petr Bugyík (http://petr.bugyik.cz)
7
 *
8
 * For the full copyright and license information, please view
9
 * the file LICENSE.md that was distributed with this source code.
10
 */
11
12
namespace Grido\Components\Filters;
13
14
/**
15
 * Filter with custom form control.
16
 *
17
 * @package     Grido
18
 * @subpackage  Components\Filters
19
 * @author      Petr Bugyík
20
 *
21
 * @property-read \Nette\Forms\IControl $formControl
22
 */
23
class Custom extends Filter
24 1
{
25
    /** @var \Nette\Forms\IControl */
26
    protected $formControl;
27
28
    /**
29
     * @param \Grido\Grid $grid
30
     * @param string $name
31
     * @param string $label
32
     * @param \Nette\Forms\IControl $formControl
33
     */
34
    public function __construct($grid, $name, $label, \Nette\Forms\IControl $formControl)
35
    {
36 1
        $this->formControl = $formControl;
37
38 1
        parent::__construct($grid, $name, $label);
39 1
    }
40
41
    /**
42
     * @return \Nette\Forms\IControl
43
     * @internal
44
     */
45
    public function getFormControl()
46
    {
47 1
        return $this->formControl;
48
    }
49
}
50