Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php namespace BuildR\Collection\Utils; |
||
29 | 4 | public static function execute($data, callable $filter) { |
|
30 | 4 | $returnedData = []; |
|
31 | |||
32 | 4 | foreach($data as $key => $value) { |
|
33 | 4 | if($filter($key, $value) === TRUE) { |
|
34 | 4 | $returnedData[$key] = $value; |
|
35 | 4 | } |
|
36 | 4 | } |
|
37 | |||
38 | 4 | return $returnedData; |
|
39 | } |
||
40 | |||
42 |