Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / dom-crawler / Form.php
index 19b8c3a931b9441d42a8d7e98f263ed03b2bf8f1..8584e016b0d7e61ca7b43a3a65be938695a0907b 100644 (file)
@@ -108,7 +108,7 @@ class Form extends Link implements \ArrayAccess
      */
     public function getFiles()
     {
-        if (!in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) {
+        if (!\in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) {
             return array();
         }
 
@@ -142,7 +142,7 @@ class Form extends Link implements \ArrayAccess
             $qs = http_build_query(array($name => $value), '', '&');
             if (!empty($qs)) {
                 parse_str($qs, $expandedValue);
-                $varName = substr($name, 0, strlen(key($expandedValue)));
+                $varName = substr($name, 0, \strlen(key($expandedValue)));
                 $values = array_replace_recursive($values, array($varName => current($expandedValue)));
             }
         }
@@ -169,7 +169,7 @@ class Form extends Link implements \ArrayAccess
             $qs = http_build_query(array($name => $value), '', '&');
             if (!empty($qs)) {
                 parse_str($qs, $expandedValue);
-                $varName = substr($name, 0, strlen(key($expandedValue)));
+                $varName = substr($name, 0, \strlen(key($expandedValue)));
 
                 array_walk_recursive(
                     $expandedValue,
@@ -202,7 +202,7 @@ class Form extends Link implements \ArrayAccess
     {
         $uri = parent::getUri();
 
-        if (!in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) {
+        if (!\in_array($this->getMethod(), array('POST', 'PUT', 'DELETE', 'PATCH'))) {
             $query = parse_url($uri, PHP_URL_QUERY);
             $currentParameters = array();
             if ($query) {
@@ -379,7 +379,7 @@ class Form extends Link implements \ArrayAccess
     protected function setNode(\DOMElement $node)
     {
         $this->button = $node;
-        if ('button' === $node->nodeName || ('input' === $node->nodeName && in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image')))) {
+        if ('button' === $node->nodeName || ('input' === $node->nodeName && \in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image')))) {
             if ($node->hasAttribute('form')) {
                 // if the node has the HTML5-compliant 'form' attribute, use it
                 $formId = $node->getAttribute('form');
@@ -480,7 +480,7 @@ class Form extends Link implements \ArrayAccess
             }
         } elseif ('input' == $nodeName && 'file' == strtolower($node->getAttribute('type'))) {
             $this->set(new Field\FileFormField($node));
-        } elseif ('input' == $nodeName && !in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image'))) {
+        } elseif ('input' == $nodeName && !\in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image'))) {
             $this->set(new Field\InputFormField($node));
         } elseif ('textarea' == $nodeName) {
             $this->set(new Field\TextareaFormField($node));