comparison 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
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
30 * {@inheritdoc} 30 * {@inheritdoc}
31 */ 31 */
32 public function __construct($options = null) 32 public function __construct($options = null)
33 { 33 {
34 // Invocation through annotations with an array parameter only 34 // Invocation through annotations with an array parameter only
35 if (is_array($options) && 1 === count($options) && isset($options['value'])) { 35 if (\is_array($options) && 1 === \count($options) && isset($options['value'])) {
36 $options = $options['value']; 36 $options = $options['value'];
37 } 37 }
38 38
39 if (is_array($options) && !isset($options['callback']) && !isset($options['groups']) && !isset($options['payload'])) { 39 if (\is_array($options) && !isset($options['callback']) && !isset($options['groups']) && !isset($options['payload'])) {
40 $options = array('callback' => $options); 40 $options = ['callback' => $options];
41 } 41 }
42 42
43 parent::__construct($options); 43 parent::__construct($options);
44 } 44 }
45 45
54 /** 54 /**
55 * {@inheritdoc} 55 * {@inheritdoc}
56 */ 56 */
57 public function getTargets() 57 public function getTargets()
58 { 58 {
59 return array(self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT); 59 return [self::CLASS_CONSTRAINT, self::PROPERTY_CONSTRAINT];
60 } 60 }
61 } 61 }