Conditions | 4 |
Paths | 5 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function filter($data, OperatorInterface $op) |
||
21 | { |
||
22 | $result = []; |
||
23 | |||
24 | foreach ($data as $id => $value) { |
||
25 | $row = new Data($value); |
||
26 | if (!isset($value['id'])) { |
||
27 | $row->set('id', $id); |
||
28 | } |
||
29 | |||
30 | if ($op->test($row)) { |
||
31 | $result[$id] = $value; |
||
32 | } |
||
33 | } |
||
34 | |||
35 | return $result; |
||
36 | } |
||
37 | } |
||
38 |