@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | protected function addValidatorTypePlugins(DependencyContainerInterface $container): DependencyContainerInterface |
38 | 38 | { |
39 | - $container[static::VALIDATOR_TYPE_PLUGINS] = function (DependencyContainerInterface $container) { |
|
39 | + $container[static::VALIDATOR_TYPE_PLUGINS] = function(DependencyContainerInterface $container) { |
|
40 | 40 | return [ |
41 | 41 | new IsRequiredPlugin(), |
42 | 42 | new IsTypePlugin(), |
@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | foreach ($this->configurationPlugins as $configurationPlugin) { |
44 | 44 | $this->validateByPlugin($data, $configurationPlugin); |
45 | 45 | } |
46 | - } |
|
47 | - catch (ValidationException $exception) { |
|
46 | + } catch (ValidationException $exception) { |
|
48 | 47 | throw new ValidationException( |
49 | 48 | sprintf( |
50 | 49 | 'Data not valid. %s', |
@@ -63,8 +62,7 @@ discard block |
||
63 | 62 | foreach ($configurationProviderPlugin->getValidatorConfiguration() as $fieldConfig) { |
64 | 63 | if (is_string($fieldConfig)) { |
65 | 64 | $this->validateField($data, $fieldConfig, $fieldConfig); |
66 | - } |
|
67 | - else { |
|
65 | + } else { |
|
68 | 66 | $this->validateNested($data, $fieldConfig); |
69 | 67 | } |
70 | 68 | } |
@@ -131,11 +129,9 @@ discard block |
||
131 | 129 | |
132 | 130 | if (strpos($key, '.*') !== false) { |
133 | 131 | $this->validateAllArrayFields($data, $key, $fieldConfig); |
134 | - } |
|
135 | - elseif (strpos($key, '.') !== false) { |
|
132 | + } elseif (strpos($key, '.') !== false) { |
|
136 | 133 | $this->validateArrayKey($data, $key, $fieldConfig); |
137 | - } |
|
138 | - else { |
|
134 | + } else { |
|
139 | 135 | $this->validateField($data, $key, $fieldConfig); |
140 | 136 | } |
141 | 137 | } |