diff vendor/symfony/validator/ConstraintViolationList.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
line wrap: on
line diff
--- a/vendor/symfony/validator/ConstraintViolationList.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/validator/ConstraintViolationList.php	Thu Feb 28 13:21:36 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;
             }
         }