src/Publisher/Helper/Validator.php
static function checkAnyRequiredParameter(array $given, array $required)
    {
        try {
            
            foreach ($required as $key) {
                if (!empty($given[$key])) {
                    throw new RequiredParameterFound();
                }
            }
            
            $parameters = implode(', ', $required);
            throw new MissingRequiredParameterException(
                    "At least one parameter required: $parameters"
            );
            
        } catch (RequiredParameterFound $ex) {
            // we have one required parameter, thats all we need
        }
    }
static function checkAnyRequiredParameter(array $given, array $required)
    {
        try {
            
            foreach ($required as $key) {
                if (!empty($given[$key])) {
                    throw new RequiredParameterFound();
                }
            }
            
            $parameters = implode(', ', $required);
            throw new MissingRequiredParameterException(
                    "At least one parameter required: $parameters"
            );
            
        } catch (RequiredParameterFound $ex) {
            // we have one required parameter, thats all we need
        }
    }
static function checkAnyRequiredParameter ( array $ given , array $ required ) { try { foreach ( $ required as $ key ) { if ( ! empty ( $ given [ $ key ] ) ) { throw new RequiredParameterFound ( ) ; } } $ parameters = implode ( ', ' , $ required ) ; throw new MissingRequiredParameterException ( "At least one parameter required: $parameters" ) ; } catch ( RequiredParameterFound $ ex ) { // we have one required parameter, thats all we need
 } }
Validates if any required parameters are set and not empty.

@param array $given
@param array $required contains required keys
Validates if any required parameters are set and not empty .