diff vendor/symfony/dom-crawler/Field/FileFormField.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 7a779792577d
children af1871eacc83
line wrap: on
line diff
--- a/vendor/symfony/dom-crawler/Field/FileFormField.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/dom-crawler/Field/FileFormField.php	Thu Feb 28 13:21:36 2019 +0000
@@ -27,12 +27,12 @@
      */
     public function setErrorCode($error)
     {
-        $codes = array(UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION);
-        if (!in_array($error, $codes)) {
+        $codes = [UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION];
+        if (!\in_array($error, $codes)) {
             throw new \InvalidArgumentException(sprintf('The error code %s is not valid.', $error));
         }
 
-        $this->value = array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => $error, 'size' => 0);
+        $this->value = ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => $error, 'size' => 0];
     }
 
     /**
@@ -75,7 +75,7 @@
             $value = '';
         }
 
-        $this->value = array('name' => $name, 'type' => '', 'tmp_name' => $value, 'error' => $error, 'size' => $size);
+        $this->value = ['name' => $name, 'type' => '', 'tmp_name' => $value, 'error' => $error, 'size' => $size];
     }
 
     /**