protected function assertParametersAreValid(array $parameters, array $requiredParameters)
    {
        foreach ($requiredParameters as $parameter) {
            if (empty($parameters[$parameter])) {
                throw RequiredParameterMissingException::withParameter($parameter);
            }
        }
    }
protected function assertParametersAreValid(array $parameters, array $requiredParameters)
    {
        foreach ($requiredParameters as $parameter) {
            if (empty($parameters[$parameter])) {
                throw RequiredParameterMissingException::withParameter($parameter);
            }
        }
    }
protected function assertParametersAreValid ( array $ parameters , array $ requiredParameters ) { foreach ( $ requiredParameters as $ parameter ) { if ( empty ( $ parameters [ $ parameter ] ) ) { throw RequiredParameterMissingException :: withParameter ( $ parameter ) ; } } }
Validates that all required parameters are set, otherwise throws an exception

@param array $parameters
@param array $requiredParameters List of required parameters
@throws RequiredParameterMissingException
Validates that all required parameters are set otherwise throws an exception