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

FilterMetadata   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 47
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
A getName() 0 4 1
A getType() 0 4 1
A getOptions() 0 4 1
A getField() 0 4 1
A getDefaults() 0 4 1
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