Completed
Pull Request — master (#68)
by Daniel
02:22
created

DateFilterData   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 33
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getValue() 0 4 1
A getComparator() 0 4 1
A getApply() 0 4 1
A isApplicable() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\Grid\Filter;
6
7
use Psi\Component\Grid\FilterDataInterface;
8
9
class DateFilterData implements FilterDataInterface
10
{
11
    private $value;
12
    private $apply;
13
    private $comparator;
14
15
    public function __construct($apply, $comparator = null, $value = null)
16
    {
17
        $this->value = $value;
18
        $this->apply = $apply;
19
        $this->comparator = $comparator;
20
    }
21
22
    public function getValue()
23
    {
24
        return $this->value;
25
    }
26
27
    public function getComparator() 
28
    {
29
        return $this->comparator;
30
    }
31
32
    public function getApply() 
33
    {
34
        return $this->apply;
35
    }
36
37
    public function isApplicable(): bool
38
    {
39
        return $this->apply;
40
    }
41
}
42