public static function keysExist(array $data, array $keys): bool
    {
        if (count($keys) > 0) {
            foreach ($keys as $key) {
                if (!array_key_exists($key, $data)) {
                    return false;
                }
            }
        }
        return true;
    }
public static function keysExist(array $data, array $keys): bool
    {
        if (count($keys) > 0) {
            foreach ($keys as $key) {
                if (!array_key_exists($key, $data)) {
                    return false;
                }
            }
        }
        return true;
    }
public static function keysExist ( array $ data , array $ keys ) : bool { if ( count ( $ keys ) > 0 ) { foreach ( $ keys as $ key ) { if ( ! array_key_exists ( $ key , $ data ) ) { return false ; } } } return true ; }
Check if all keys exist in array.

@param mixed[] $data
@param string[] $keys
@return bool
Check if all keys exist in array .