public static function nulls(array $data, $keys = null)
    {
        if ($keys === null) {
            $keys = array_keys($data);
        }

        if (!Arrays::isArray($keys)) {
            $keys = array($keys);
        }

        foreach ($keys as $key) {
            if (array_key_exists($key, $data) && empty($data[$key])) {
                $data[$key] = null;
            }
        }

        return $data;
    }
public static function nulls(array $data, $keys = null)
    {
        if ($keys === null) {
            $keys = array_keys($data);
        }

        if (!Arrays::isArray($keys)) {
            $keys = array($keys);
        }

        foreach ($keys as $key) {
            if (array_key_exists($key, $data) && empty($data[$key])) {
                $data[$key] = null;
            }
        }

        return $data;
    }
public static function nulls ( array $ data , $ keys = null ) { if ( $ keys === null ) { $ keys = array_keys ( $ data ) ; } if ( ! Arrays :: isArray ( $ keys ) ) { $ keys = array ( $ keys ) ; } foreach ( $ keys as $ key ) { if ( array_key_exists ( $ key , $ data ) && empty ( $ data [ $ key ] ) ) { $ data [ $ key ] = null ; } } return $ data ; }
Filter empty values to be treated as nulls

@param mixed $keys
@param array $data

@return array
Filter empty values to be treated as nulls