src/Utils/IterableUtils.php
public static function map(array $arr, callable $callback): array
    {
        $arrResult = [];

        foreach ($arr as $index => $value) {
            $arrResult[] = $callback($value, $index);
        }

        return $arrResult;
    }
public static function map(array $arr, callable $callback): array
    {
        $arrResult = [];

        foreach ($arr as $index => $value) {
            $arrResult[] = $callback($value, $index);
        }

        return $arrResult;
    }
public static function map ( array $ arr , callable $ callback ) : array { $ arrResult = [ ] ; foreach ( $ arr as $ index => $ value ) { $ arrResult [ ] = $ callback ( $ value , $ index ) ; } return $ arrResult ; }
It goes through all the elements and performs the function of callabck

@param array $arr The array to be used
@param callable $callback Function fired in array elements
@return array
It goes through all the elements and performs the function of callabck