| 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 | 6 | public static function execute($data, callable $filter) { |
|
| 30 | 6 | $returnedData = []; |
|
| 31 | |||
| 32 | 6 | foreach($data as $key => $value) { |
|
| 33 | 6 | if($filter($key, $value) === TRUE) { |
|
| 34 | 6 | $returnedData[$key] = $value; |
|
| 35 | 6 | } |
|
| 36 | 6 | } |
|
| 37 | |||
| 38 | 6 | return $returnedData; |
|
| 39 | } |
||
| 40 | |||
| 42 |