| Total Complexity | 4 | 
| Total Lines | 32 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 15 | abstract class Compare implements FilterInterface  | 
            ||
| 16 | { | 
            ||
| 17 | private bool|DateTimeInterface|float|int|string $value;  | 
            ||
| 18 | |||
| 19 | /**  | 
            ||
| 20 | * @param string $field Name of the field to compare.  | 
            ||
| 21 | * @param bool|DateTimeInterface|float|int|string $value Value to compare to.  | 
            ||
| 22 | */  | 
            ||
| 23 | 81 | public function __construct(private string $field, mixed $value)  | 
            |
| 26 | }  | 
            ||
| 27 | |||
| 28 | /**  | 
            ||
| 29 | * @param bool|DateTimeInterface|float|int|string $value Value to compare to.  | 
            ||
| 30 | */  | 
            ||
| 31 | 1 | final public function withValue(mixed $value): static  | 
            |
| 32 |     { | 
            ||
| 33 | 1 | $new = clone $this;  | 
            |
| 34 | 1 | $new->setValue($value);  | 
            |
| 35 | 1 | return $new;  | 
            |
| 36 | }  | 
            ||
| 37 | |||
| 38 | 55 | public function toCriteriaArray(): array  | 
            |
| 39 |     { | 
            ||
| 40 | 55 | return [static::getOperator(), $this->field, $this->value];  | 
            |
| 41 | }  | 
            ||
| 42 | |||
| 43 | 81 | private function setValue(mixed $value): void  | 
            |
| 47 | }  | 
            ||
| 48 | }  | 
            ||
| 49 |