protected function cleanArray($array, $keys = null)
    {
        $keys = $keys ?: array_keys($array);

        foreach ($keys as $key) {
            if (is_array($value = Arr::get($array, $key))) {
                Arr::set($array, $key, array_filter($value));
            }
        }

        return $array;
    }
protected function cleanArray($array, $keys = null)
    {
        $keys = $keys ?: array_keys($array);

        foreach ($keys as $key) {
            if (is_array($value = Arr::get($array, $key))) {
                Arr::set($array, $key, array_filter($value));
            }
        }

        return $array;
    }
protected function cleanArray ( $ array , $ keys = null ) { $ keys = $ keys ? : array_keys ( $ array ) ; foreach ( $ keys as $ key ) { if ( is_array ( $ value = Arr :: get ( $ array , $ key ) ) ) { Arr :: set ( $ array , $ key , array_filter ( $ value ) ) ; } } return $ array ; }
Clean the given array.

@param  array  $array
@param  array|null  $keys
@return array
Clean the given array .