From 2bbebd9419922716795dfd978fdb0adf4a22d552 Mon Sep 17 00:00:00 2001 From: Robin Krahnen Date: Tue, 10 Mar 2020 14:35:24 +0100 Subject: [PATCH] PSR-12 --- Classes/Package.php | 4 +++- Classes/Validation/Validator/SettingsValidator.php | 8 ++------ 2 files changed, 5 insertions(+), 7 deletions(-) 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'];