optimized code

This commit is contained in:
Robin Krahnen 2020-05-14 14:43:48 +02:00
parent 0de085c5cf
commit 8c9790b662

View file

@ -15,8 +15,10 @@ namespace DigiComp\SettingValidator\Validation\Validator;
use DigiComp\SettingValidator\Package; use DigiComp\SettingValidator\Package;
use Neos\Flow\Annotations as Flow; use Neos\Flow\Annotations as Flow;
use Neos\Flow\Configuration\ConfigurationManager; use Neos\Flow\Configuration\ConfigurationManager;
use Neos\Flow\Configuration\Exception\InvalidConfigurationTypeException;
use Neos\Flow\Validation\Exception\InvalidValidationConfigurationException; use Neos\Flow\Validation\Exception\InvalidValidationConfigurationException;
use Neos\Flow\Validation\Exception\InvalidValidationOptionsException; use Neos\Flow\Validation\Exception\InvalidValidationOptionsException;
use Neos\Flow\Validation\Exception\NoSuchValidatorException;
use Neos\Flow\Validation\Validator\AbstractValidator; use Neos\Flow\Validation\Validator\AbstractValidator;
use Neos\Flow\Validation\ValidatorResolver; use Neos\Flow\Validation\ValidatorResolver;
use Neos\Utility\ObjectAccess; use Neos\Utility\ObjectAccess;
@ -42,7 +44,7 @@ class SettingsValidator extends AbstractValidator
/** /**
* @var array * @var array
*/ */
protected $supportedOptions = [ protected array $supportedOptions = [
'name' => ['', 'Set the name of the setting-array to use.', 'string', false], 'name' => ['', 'Set the name of the setting-array to use.', 'string', false],
'validationGroups' => [ 'validationGroups' => [
['Default'], ['Default'],
@ -54,8 +56,10 @@ class SettingsValidator extends AbstractValidator
/** /**
* @inheritDoc * @inheritDoc
* @throws InvalidConfigurationTypeException
* @throws InvalidValidationOptionsException * @throws InvalidValidationOptionsException
* @throws InvalidValidationConfigurationException * @throws InvalidValidationConfigurationException
* @throws NoSuchValidatorException
*/ */
protected function isValid($value) protected function isValid($value)
{ {