1 | <?php |
||
5 | class Arr |
||
6 | { |
||
7 | 3 | public static function filter(array $array, callable $callback): array |
|
11 | |||
12 | 44 | public static function map(array $array, callable $callback): array |
|
20 | |||
21 | 13 | public static function flatMap(array $array, callable $callback): array |
|
37 | |||
38 | 41 | public static function pull(&$array, $key, $default = null) |
|
46 | |||
47 | 41 | public static function mirror(array $array): array |
|
51 | |||
52 | 38 | public static function createUniquePairs(array $array): array |
|
64 | } |
||
65 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.