PSR-12
This commit is contained in:
parent
5f77512296
commit
2bbebd9419
2 changed files with 5 additions and 7 deletions
|
@ -31,7 +31,9 @@ class Package extends BasePackage
|
||||||
parent::boot($bootstrap);
|
parent::boot($bootstrap);
|
||||||
|
|
||||||
$dispatcher = $bootstrap->getSignalSlotDispatcher();
|
$dispatcher = $bootstrap->getSignalSlotDispatcher();
|
||||||
$dispatcher->connect(ConfigurationManager::class, 'configurationManagerReady',
|
$dispatcher->connect(
|
||||||
|
ConfigurationManager::class,
|
||||||
|
'configurationManagerReady',
|
||||||
function (ConfigurationManager $configurationManager) {
|
function (ConfigurationManager $configurationManager) {
|
||||||
$configurationManager->registerConfigurationType(
|
$configurationManager->registerConfigurationType(
|
||||||
static::CONFIGURATION_TYPE_VALIDATION,
|
static::CONFIGURATION_TYPE_VALIDATION,
|
||||||
|
|
|
@ -168,9 +168,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']) && empty(array_intersect($validatorConfig['options']['validationGroups'], $this->options['validationGroups']))) {
|
||||||
&& empty(array_intersect($validatorConfig['options']['validationGroups'], $this->options['validationGroups']))
|
|
||||||
) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,9 +182,7 @@ class SettingsValidator extends AbstractValidator
|
||||||
*/
|
*/
|
||||||
protected function handleValidationGroups(array &$validatorConfig)
|
protected function handleValidationGroups(array &$validatorConfig)
|
||||||
{
|
{
|
||||||
if (isset($validatorConfig['options']['validationGroups'])
|
if (isset($validatorConfig['options']['validationGroups']) && $validatorConfig['validator'] !== 'DigiComp.SettingValidator:Settings') {
|
||||||
&& $validatorConfig['validator'] !== 'DigiComp.SettingValidator:Settings'
|
|
||||||
) {
|
|
||||||
unset($validatorConfig['options']['validationGroups']);
|
unset($validatorConfig['options']['validationGroups']);
|
||||||
} elseif ($validatorConfig['validator'] === 'DigiComp.SettingValidator:Settings') {
|
} elseif ($validatorConfig['validator'] === 'DigiComp.SettingValidator:Settings') {
|
||||||
$validatorConfig['options']['validationGroups'] = $this->options['validationGroups'];
|
$validatorConfig['options']['validationGroups'] = $this->options['validationGroups'];
|
||||||
|
|
Loading…
Reference in a new issue