Total Complexity | 4 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | abstract class Compare implements FilterInterface |
||
14 | { |
||
15 | /** |
||
16 | * @param string $field Name of the field to compare. |
||
17 | * @param bool|DateTimeInterface|float|int|string $value Value to compare to. |
||
18 | */ |
||
19 | 97 | public function __construct( |
|
20 | private readonly string $field, |
||
21 | private bool|DateTimeInterface|float|int|string $value, |
||
22 | ) { |
||
23 | 97 | } |
|
24 | |||
25 | 109 | public function getField(): string |
|
28 | } |
||
29 | |||
30 | 109 | public function getValue(): float|DateTimeInterface|bool|int|string |
|
31 | { |
||
32 | 109 | return $this->value; |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param bool|DateTimeInterface|float|int|string $value Value to compare to. |
||
37 | */ |
||
38 | 2 | final public function withValue(bool|DateTimeInterface|float|int|string $value): static |
|
43 | } |
||
44 | } |
||
45 |