diff vendor/symfony/browser-kit/Cookie.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 5fb285c0d0e3
children
line wrap: on
line diff
--- a/vendor/symfony/browser-kit/Cookie.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/browser-kit/Cookie.php	Thu Feb 28 13:21:36 2019 +0000
@@ -22,7 +22,7 @@
      * Handles dates as defined by RFC 2616 section 3.3.1, and also some other
      * non-standard, but common formats.
      */
-    private static $dateFormats = array(
+    private static $dateFormats = [
         'D, d M Y H:i:s T',
         'D, d-M-y H:i:s T',
         'D, d-M-Y H:i:s T',
@@ -30,7 +30,7 @@
         'D, d-m-Y H:i:s T',
         'D M j G:i:s Y',
         'D M d H:i:s Y T',
-    );
+    ];
 
     protected $name;
     protected $value;
@@ -129,7 +129,7 @@
 
         list($name, $value) = explode('=', array_shift($parts), 2);
 
-        $values = array(
+        $values = [
             'name' => trim($name),
             'value' => trim($value),
             'expires' => null,
@@ -138,7 +138,7 @@
             'secure' => false,
             'httponly' => false,
             'passedRawValue' => true,
-        );
+        ];
 
         if (null !== $url) {
             if ((false === $urlParts = parse_url($url)) || !isset($urlParts['host'])) {
@@ -169,7 +169,7 @@
                 continue;
             }
 
-            if (2 === count($elements = explode('=', $part, 2))) {
+            if (2 === \count($elements = explode('=', $part, 2))) {
                 if ('expires' === strtolower($elements[0])) {
                     $elements[1] = self::parseDate($elements[1]);
                 }
@@ -193,7 +193,7 @@
     private static function parseDate($dateValue)
     {
         // trim single quotes around date if present
-        if (($length = strlen($dateValue)) > 1 && "'" === $dateValue[0] && "'" === $dateValue[$length - 1]) {
+        if (($length = \strlen($dateValue)) > 1 && "'" === $dateValue[0] && "'" === $dateValue[$length - 1]) {
             $dateValue = substr($dateValue, 1, -1);
         }