Completed
Push — master ( 1fe708...6360f1 )
by Arnaud
16s queued 12s
created

Filter   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 7
eloc 19
c 1
b 0
f 1
dl 0
loc 53
ccs 20
cts 20
cp 1
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getComparator() 0 3 1
A getPath() 0 3 1
A getOperator() 0 3 1
A getValue() 0 3 1
A getName() 0 3 1
A __construct() 0 14 1
A getType() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LAG\AdminBundle\Filter;
6
7
class Filter implements FilterInterface
8
{
9
    private string $name;
10
    private $value;
11
    private string $operator;
12
    private string $comparator;
13
    private string $type;
14
    private string $path;
15
16 2
    public function __construct(
17
        string $name,
18
        $value,
19
        string $type,
20
        string $path,
21
        string $comparator = 'like',
22
        string $operator = 'or'
23
    ) {
24 2
        $this->name = $name;
25 2
        $this->value = $value;
26 2
        $this->type = $type;
27 2
        $this->path = $path;
28 2
        $this->operator = $operator;
29 2
        $this->comparator = $comparator;
30 2
    }
31
32 1
    public function getName(): string
33
    {
34 1
        return $this->name;
35
    }
36
37 1
    public function getValue()
38
    {
39 1
        return $this->value;
40
    }
41
42 1
    public function getType(): string
43
    {
44 1
        return $this->type;
45
    }
46
47 1
    public function getComparator(): string
48
    {
49 1
        return $this->comparator;
50
    }
51
52 1
    public function getOperator(): string
53
    {
54 1
        return $this->operator;
55
    }
56
57 1
    public function getPath(): string
58
    {
59 1
        return $this->path;
60
    }
61
}
62