Completed
Push — master ( 37c80a...ff21cb )
by Daniel
04:31 queued 02:13
created

FilterMetadata::getDefaults()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\Grid\Metadata;
6
7
final class FilterMetadata
8
{
9
    private $name;
10
    private $type;
11
    private $options = [];
12
    private $field;
13
    private $defaults = [];
14
15
    public function __construct(
16
        string $name,
17
        string $type,
18
        string $field = null,
19
        $defaults = [],
20
        array $options = []
21
    ) {
22
        $this->name = $name;
23
        $this->type = $type;
24
        $this->options = $options;
25
        $this->defaults = $defaults;
26
        $this->field = $field;
27
    }
28
29
    public function getName(): string
30
    {
31
        return $this->name;
32
    }
33
34
    public function getType(): string
35
    {
36
        return $this->type;
37
    }
38
39
    public function getOptions(): array
40
    {
41
        return $this->options;
42
    }
43
44
    public function getField()
45
    {
46
        return $this->field;
47
    }
48
49
    public function getDefaults(): array
50
    {
51
        return $this->defaults;
52
    }
53
}
54