@@ -276,10 +276,10 @@ discard block |
||
276 | 276 | ->setAllowedValues('exclusion_policy', [ExclusionPolicy::NONE, ExclusionPolicy::ALL]) |
277 | 277 | ->setAllowedValues('order', $emptyValidator) |
278 | 278 | ->setAllowedValues('xml_root', $emptyValidator) |
279 | - ->setAllowedValues('properties', function ($properties) { |
|
279 | + ->setAllowedValues('properties', function($properties) { |
|
280 | 280 | return count($properties) > 0; |
281 | 281 | }) |
282 | - ->setNormalizer('order', function (Options $options, $order) use ($emptyValidator) { |
|
282 | + ->setNormalizer('order', function(Options $options, $order) use ($emptyValidator) { |
|
283 | 283 | if (is_string($order)) { |
284 | 284 | if (strcasecmp($order, 'ASC') === 0 || strcasecmp($order, 'DESC') === 0) { |
285 | 285 | return strtoupper($order); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | return $order; |
305 | 305 | }) |
306 | - ->setNormalizer('properties', function (Options $options, array $properties) { |
|
306 | + ->setNormalizer('properties', function(Options $options, array $properties) { |
|
307 | 307 | if ($this->propertyResolver === null) { |
308 | 308 | $this->configurePropertyOptions($this->propertyResolver = new OptionsResolver()); |
309 | 309 | } |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | 'xml_key_as_node', |
366 | 366 | 'xml_value', |
367 | 367 | ]) |
368 | - ->setDefault('groups', function (Options $options, $groups) { |
|
368 | + ->setDefault('groups', function(Options $options, $groups) { |
|
369 | 369 | return $groups === null ? [PropertyMetadataInterface::GROUP_DEFAULT] : $groups; |
370 | 370 | }) |
371 | 371 | ->setAllowedTypes('accessor', 'string') |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | ->setAllowedValues('until', $emptyValidator) |
396 | 396 | ->setAllowedValues('xml_entry', $emptyValidator) |
397 | 397 | ->setAllowedValues('xml_entry_attribute', $emptyValidator) |
398 | - ->setAllowedValues('groups', function (array $groups) use ($emptyValidator) { |
|
398 | + ->setAllowedValues('groups', function(array $groups) use ($emptyValidator) { |
|
399 | 399 | foreach ($groups as $group) { |
400 | 400 | if (!is_string($group) || !call_user_func($emptyValidator, $group)) { |
401 | 401 | return false; |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | |
405 | 405 | return count($groups) > 0; |
406 | 406 | }) |
407 | - ->setAllowedValues('max_depth', function ($maxDepth) { |
|
407 | + ->setAllowedValues('max_depth', function($maxDepth) { |
|
408 | 408 | return $maxDepth >= 0; |
409 | 409 | }); |
410 | 410 | } |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | private function getEmptyValidator() |
416 | 416 | { |
417 | 417 | if ($this->emptyValidator === null) { |
418 | - $this->emptyValidator = function ($value) { |
|
418 | + $this->emptyValidator = function($value) { |
|
419 | 419 | return !empty($value); |
420 | 420 | }; |
421 | 421 | } |