FilterFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 16
ccs 0
cts 11
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php
2
3
namespace Sco\Admin\Display;
4
5
use Sco\Admin\Contracts\Display\FilterFactoryInterface;
6
use Sco\Admin\Traits\AliasBinder;
7
use Sco\Admin\Display\Filters\Checkbox;
8
use Sco\Admin\Display\Filters\DateRange;
9
use Sco\Admin\Display\Filters\DateTimeRange;
10
use Sco\Admin\Display\Filters\Text;
11
use Sco\Admin\Display\Filters\Radio;
12
use Sco\Admin\Display\Filters\Select;
13
14
/**
15
 * @method static Text text($name, $title) input form
16
 * @method static Radio radio($name, $title, $options = null) radio form
17
 * @method static Select select($name, $title, $options = null) select form
18
 * @method static Checkbox checkbox($name, $title, $options = null) checkbox form
19
 * @method static DateRange daterange($name, $title)
20
 * @method static DateTimeRange datetimerange($name, $title)
21
 */
22
class FilterFactory implements FilterFactoryInterface
23
{
24
    use AliasBinder;
25
26
    public function __construct()
27
    {
28
        $this->register([
29
            'radio'         => Radio::class,
30
            'checkbox'      => Checkbox::class,
31
            'text'          => Text::class,
32
            'select'        => Select::class,
33
            'daterange'     => DateRange::class,
34
            'datetimerange' => DateTimeRange::class,
35
        ]);
36
    }
37
}
38