1 | <?php |
||
4 | class Traverse |
||
5 | { |
||
6 | |||
7 | |||
8 | /** |
||
9 | * Applies the callback to the elements of the given arrays |
||
10 | * |
||
11 | * @param array $array |
||
12 | * @param callable $callback |
||
13 | * |
||
14 | * @return $array |
||
|
|||
15 | */ |
||
16 | public function map(array $array, callable $callback) |
||
30 | |||
31 | /** |
||
32 | * Filters each of the given values through a function. |
||
33 | * |
||
34 | * @param array $array |
||
35 | * @param callable $callback |
||
36 | * |
||
37 | * @return array |
||
38 | */ |
||
39 | public function filter(array $array, callable $callback) |
||
51 | |||
52 | /** |
||
53 | * The opposite of filter(). |
||
54 | * |
||
55 | * @param array $array |
||
56 | * @param callable $cb Function to filter values. |
||
57 | * |
||
58 | * @return array filtered array. |
||
59 | */ |
||
60 | public static function reject(array $array, callable $cb) |
||
66 | } |
||
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.