diff --git a/Classes/Package.php b/Classes/Package.php index 7a8e117..7f7f1b8 100644 --- a/Classes/Package.php +++ b/Classes/Package.php @@ -31,7 +31,9 @@ class Package extends BasePackage parent::boot($bootstrap); $dispatcher = $bootstrap->getSignalSlotDispatcher(); - $dispatcher->connect(ConfigurationManager::class, 'configurationManagerReady', + $dispatcher->connect( + ConfigurationManager::class, + 'configurationManagerReady', function (ConfigurationManager $configurationManager) { $configurationManager->registerConfigurationType( static::CONFIGURATION_TYPE_VALIDATION, diff --git a/Classes/Validation/Validator/SettingsValidator.php b/Classes/Validation/Validator/SettingsValidator.php index 93913b1..5e005ef 100644 --- a/Classes/Validation/Validator/SettingsValidator.php +++ b/Classes/Validation/Validator/SettingsValidator.php @@ -168,9 +168,7 @@ class SettingsValidator extends AbstractValidator */ protected function doesValidationGroupsMatch(array &$validatorConfig) { - if (isset($validatorConfig['options']['validationGroups']) - && empty(array_intersect($validatorConfig['options']['validationGroups'], $this->options['validationGroups'])) - ) { + if (isset($validatorConfig['options']['validationGroups']) && empty(array_intersect($validatorConfig['options']['validationGroups'], $this->options['validationGroups']))) { return false; } @@ -184,9 +182,7 @@ class SettingsValidator extends AbstractValidator */ protected function handleValidationGroups(array &$validatorConfig) { - if (isset($validatorConfig['options']['validationGroups']) - && $validatorConfig['validator'] !== 'DigiComp.SettingValidator:Settings' - ) { + if (isset($validatorConfig['options']['validationGroups']) && $validatorConfig['validator'] !== 'DigiComp.SettingValidator:Settings') { unset($validatorConfig['options']['validationGroups']); } elseif ($validatorConfig['validator'] === 'DigiComp.SettingValidator:Settings') { $validatorConfig['options']['validationGroups'] = $this->options['validationGroups'];