Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / validator / Constraints / Collection.php
index 9cb2063042faeac3d5dce2fcbb7b6a6c6a2fb2ba..2b5679b22d07e8ba84b9ae70fef2c5effcfbc91c 100644 (file)
@@ -41,7 +41,7 @@ class Collection extends Composite
     public function __construct($options = null)
     {
         // no known options set? $options is the fields array
-        if (is_array($options)
+        if (\is_array($options)
             && !array_intersect(array_keys($options), array('groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'))) {
             $options = array('fields' => $options);
         }
@@ -56,14 +56,14 @@ class Collection extends Composite
     {
         parent::initializeNestedConstraints();
 
-        if (!is_array($this->fields)) {
+        if (!\is_array($this->fields)) {
             throw new ConstraintDefinitionException(sprintf('The option "fields" is expected to be an array in constraint %s', __CLASS__));
         }
 
         foreach ($this->fields as $fieldName => $field) {
             // the XmlFileLoader and YamlFileLoader pass the field Optional
             // and Required constraint as an array with exactly one element
-            if (is_array($field) && 1 == count($field)) {
+            if (\is_array($field) && 1 == \count($field)) {
                 $this->fields[$fieldName] = $field = $field[0];
             }