Passed
Push — master ( f06de2...0ad1df )
by Alexander
02:43 queued 01:20
created

GreaterThanOrEqual::match()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Yiisoft\Data\Reader\Iterable\Processor;
5
6
use Yiisoft\Data\Reader\Filter\FilterProcessorInterface;
7
8
class GreaterThanOrEqual implements IterableProcessorInterface, FilterProcessorInterface
9
{
10
11 59
    public function getOperator(): string
12
    {
13 59
        return \YiiSoft\Data\Reader\Filter\GreaterThanOrEqual::getOperator();
14
    }
15
16 5
    public function match(array $item, array $arguments, array $filterProcessors): bool
17
    {
18 5
        [$field, $value] = $arguments;
19 5
        return $item[$field] >= $value;
20
    }
21
22
}
23