diff vendor/symfony/browser-kit/Response.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
line wrap: on
line diff
--- a/vendor/symfony/browser-kit/Response.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/browser-kit/Response.php	Thu Feb 28 13:21:36 2019 +0000
@@ -28,7 +28,7 @@
      * @param int    $status  The response status code
      * @param array  $headers An array of headers
      */
-    public function __construct($content = '', $status = 200, array $headers = array())
+    public function __construct($content = '', $status = 200, array $headers = [])
     {
         $this->content = $content;
         $this->status = $status;
@@ -44,7 +44,7 @@
     {
         $headers = '';
         foreach ($this->headers as $name => $value) {
-            if (is_string($value)) {
+            if (\is_string($value)) {
                 $headers .= $this->buildHeader($name, $value);
             } else {
                 foreach ($value as $headerValue) {
@@ -113,13 +113,13 @@
         foreach ($this->headers as $key => $value) {
             if (str_replace('-', '_', strtolower($key)) === $normalizedHeader) {
                 if ($first) {
-                    return is_array($value) ? (count($value) ? $value[0] : '') : $value;
+                    return \is_array($value) ? (\count($value) ? $value[0] : '') : $value;
                 }
 
-                return is_array($value) ? $value : array($value);
+                return \is_array($value) ? $value : [$value];
             }
         }
 
-        return $first ? null : array();
+        return $first ? null : [];
     }
 }