Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/validator/Constraints/AbstractComparison.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
31 * {@inheritdoc} | 31 * {@inheritdoc} |
32 */ | 32 */ |
33 public function __construct($options = null) | 33 public function __construct($options = null) |
34 { | 34 { |
35 if (null === $options) { | 35 if (null === $options) { |
36 $options = array(); | 36 $options = []; |
37 } | 37 } |
38 | 38 |
39 if (is_array($options)) { | 39 if (\is_array($options)) { |
40 if (!isset($options['value']) && !isset($options['propertyPath'])) { | 40 if (!isset($options['value']) && !isset($options['propertyPath'])) { |
41 throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires either the "value" or "propertyPath" option to be set.', get_class($this))); | 41 throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires either the "value" or "propertyPath" option to be set.', \get_class($this))); |
42 } | 42 } |
43 | 43 |
44 if (isset($options['value']) && isset($options['propertyPath'])) { | 44 if (isset($options['value']) && isset($options['propertyPath'])) { |
45 throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "value" or "propertyPath" options to be set, not both.', get_class($this))); | 45 throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "value" or "propertyPath" options to be set, not both.', \get_class($this))); |
46 } | 46 } |
47 | 47 |
48 if (isset($options['propertyPath']) && !class_exists(PropertyAccess::class)) { | 48 if (isset($options['propertyPath']) && !class_exists(PropertyAccess::class)) { |
49 throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', get_class($this))); | 49 throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires the Symfony PropertyAccess component to use the "propertyPath" option.', \get_class($this))); |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 parent::__construct($options); | 53 parent::__construct($options); |
54 } | 54 } |