Passed
Pull Request — master (#173)
by
unknown
12:58
created

ILike::getField()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Data\Reader\Filter;
6
7
use Yiisoft\Data\Reader\FilterInterface;
8
9
/**
10
 * `ILike` filter defines a criteria for ensuring field value is like-match to a given value (case-insensitive).
11
 */
12
final class ILike implements FilterInterface
13
{
14
    /**
15
     * @param string $field Name of the field to compare.
16
     * @param string $value Value to like-compare with.
17
     */
18 6
    public function __construct(
19
        private readonly string $field,
20
        private readonly string $value,
21
    ) {
22 6
    }
23
24 6
    public function getField(): string
25
    {
26 6
        return $this->field;
27
    }
28
29 5
    public function getValue(): string
30
    {
31 5
        return $this->value;
32
    }
33
}
34