protected function validateAtLeastOneOf(array $atLeastOneOf, array $params)
    {
        foreach ($atLeastOneOf as $param) {
            if (isset($params[$param])) {
                return true;
            }
        }

        throw new MissingArgumentException(sprintf(
            'You need to provide at least one of the following parameters "%s".',
            implode('", "', $atLeastOneOf)
        ));
    }
protected function validateAtLeastOneOf(array $atLeastOneOf, array $params)
    {
        foreach ($atLeastOneOf as $param) {
            if (isset($params[$param])) {
                return true;
            }
        }

        throw new MissingArgumentException(sprintf(
            'You need to provide at least one of the following parameters "%s".',
            implode('", "', $atLeastOneOf)
        ));
    }
protected function validateAtLeastOneOf ( array $ atLeastOneOf , array $ params ) { foreach ( $ atLeastOneOf as $ param ) { if ( isset ( $ params [ $ param ] ) ) { return true ; } } throw new MissingArgumentException ( sprintf ( 'You need to provide at least one of the following parameters "%s".' , implode ( '", "' , $ atLeastOneOf ) ) ) ; }
Validate that the params array includes at least one of
the keys in a given array

@param string[] $atLeastOneOf allowed properties
@param array $params       array to check

@return boolean

@throws MissingArgumentException
Validate that the params array includes at least one of the keys in a given array