Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function map(array $array, callable $callback) |
||
17 | { |
||
18 | $newArray = []; |
||
19 | |||
20 | foreach ($array as $key => $item) { |
||
21 | $result = call_user_func($callback, $item, $key); |
||
22 | |||
23 | $newArray = is_array($result) ? |
||
24 | array_replace_recursive($array, $result) : |
||
25 | array_merge_recursive($array, (array) $result); |
||
26 | } |
||
27 | |||
28 | return $newArray; |
||
29 | } |
||
30 | |||
67 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.