diff vendor/symfony/validator/Constraints/Count.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
line wrap: on
line diff
--- a/vendor/symfony/validator/Constraints/Count.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/validator/Constraints/Count.php	Thu Feb 28 13:21:36 2019 +0000
@@ -25,10 +25,10 @@
     const TOO_FEW_ERROR = 'bef8e338-6ae5-4caf-b8e2-50e7b0579e69';
     const TOO_MANY_ERROR = '756b1212-697c-468d-a9ad-50dd783bb169';
 
-    protected static $errorNames = array(
+    protected static $errorNames = [
         self::TOO_FEW_ERROR => 'TOO_FEW_ERROR',
         self::TOO_MANY_ERROR => 'TOO_MANY_ERROR',
-    );
+    ];
 
     public $minMessage = 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.';
     public $maxMessage = 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.';
@@ -38,17 +38,17 @@
 
     public function __construct($options = null)
     {
-        if (null !== $options && !is_array($options)) {
-            $options = array(
+        if (null !== $options && !\is_array($options)) {
+            $options = [
                 'min' => $options,
                 'max' => $options,
-            );
+            ];
         }
 
         parent::__construct($options);
 
         if (null === $this->min && null === $this->max) {
-            throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), array('min', 'max'));
+            throw new MissingOptionsException(sprintf('Either option "min" or "max" must be given for constraint %s', __CLASS__), ['min', 'max']);
         }
     }
 }