<?php

// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound -- APD is the established namespace shared with the Pro add-on and retained for backward compatibility.
namespace APD\Support;

defined('ABSPATH') || exit;

class Validator
{
    public static function requireKeys(array $payload, array $keys) : bool
    {
        foreach ($keys as $key) {
            if (! array_key_exists($key, $payload)) {
                return false;
            }
        }

        return true;
    }
}
