use empty() instead of count()

This commit is contained in:
Robin Krahnen 2018-05-30 17:15:06 +02:00
parent 2ca4e6e6ae
commit 8b9da3197e

View file

@ -169,7 +169,7 @@ class SettingsValidator extends AbstractValidator
protected function doesValidationGroupsMatch(array &$validatorConfig) protected function doesValidationGroupsMatch(array &$validatorConfig)
{ {
if (isset($validatorConfig['options']['validationGroups']) if (isset($validatorConfig['options']['validationGroups'])
&& count(array_intersect($validatorConfig['options']['validationGroups'], $this->options['validationGroups'])) === 0 && empty(array_intersect($validatorConfig['options']['validationGroups'], $this->options['validationGroups']))
) { ) {
return false; return false;
} }