public static function toBatchData($data, $adds = [])
    {
        foreach ($data as $k => $v) {
            $data[$k] = array_merge([$v], $adds);
        }
        return $data;
    }
public static function toBatchData($data, $adds = [])
    {
        foreach ($data as $k => $v) {
            $data[$k] = array_merge([$v], $adds);
        }
        return $data;
    }
public static function toBatchData ( $ data , $ adds = [ ] ) { foreach ( $ data as $ k => $ v ) { $ data [ $ k ] = array_merge ( [ $ v ] , $ adds ) ; } return $ data ; }
Merges array sub-arrays with another array which data is common for all sub-array elements.
@param $data
@param array $adds
@return mixed
Merges array sub - arrays with another array which data is common for all sub - array elements .