Mercurial > hg > cmmr2012-drupal-site
diff vendor/symfony/validator/Constraints/Callback.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/vendor/symfony/validator/Constraints/Callback.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/symfony/validator/Constraints/Callback.php Thu Feb 28 13:11:55 2019 +0000 @@ -32,12 +32,12 @@ public function __construct($options = null) { // Invocation through annotations with an array parameter only - if (is_array($options) && 1 === count($options) && isset($options['value'])) { + if (\is_array($options) && 1 === \count($options) && isset($options['value'])) { $options = $options['value']; } - if (is_array($options) && !isset($options['callback']) && !isset($options['groups']) && !isset($options['payload'])) { - $options = array('callback' => $options); + if (\is_array($options) && !isset($options['callback']) && !isset($options['groups']) && !isset($options['payload'])) { + $options = ['callback' => $options]; } parent::__construct($options); @@ -56,6 +56,6 @@ */ public function getTargets() { - return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); + return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT]; } }