| 1 | <?php |
||
| 5 | class Arr |
||
| 6 | { |
||
| 7 | 3 | public static function filter(array $array, callable $callback): array |
|
| 11 | |||
| 12 | 32 | public static function map(array $array, callable $callback): array |
|
| 20 | |||
| 21 | 2 | public static function flatMap(array $array, callable $callback): array |
|
| 37 | |||
| 38 | 29 | public static function pull(&$array, $key, $default = null) |
|
| 46 | |||
| 47 | 29 | public static function mirror(array $array): array |
|
| 51 | |||
| 52 | 26 | 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
@returnannotation as described here.