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

In   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 12
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A match() 0 4 1
A getOperator() 0 3 1
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 In implements IterableProcessorInterface, FilterProcessorInterface
9
{
10
11 59
    public function getOperator(): string
12
    {
13 59
        return \YiiSoft\Data\Reader\Filter\In::getOperator();
14
    }
15
16 1
    public function match(array $item, array $arguments, array $filterProcessors): bool
17
    {
18 1
        [$field, $values] = $arguments;
19 1
        return in_array($item[$field], $values, false);
20
    }
21
22
}
23