Mercurial > hg > cmmr2012-drupal-site
diff vendor/symfony/validator/ConstraintViolationList.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/ConstraintViolationList.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/symfony/validator/ConstraintViolationList.php Thu Feb 28 13:11:55 2019 +0000 @@ -21,14 +21,14 @@ /** * @var ConstraintViolationInterface[] */ - private $violations = array(); + private $violations = []; /** * Creates a new constraint violation list. * * @param ConstraintViolationInterface[] $violations The constraint violations to add to the list */ - public function __construct(array $violations = array()) + public function __construct(array $violations = []) { foreach ($violations as $violation) { $this->add($violation); @@ -120,7 +120,7 @@ */ public function count() { - return count($this->violations); + return \count($this->violations); } /** @@ -169,9 +169,9 @@ public function findByCodes($codes) { $codes = (array) $codes; - $violations = array(); + $violations = []; foreach ($this as $violation) { - if (in_array($violation->getCode(), $codes, true)) { + if (\in_array($violation->getCode(), $codes, true)) { $violations[] = $violation; } }