diff vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children af1871eacc83
line wrap: on
line diff
--- a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php	Thu Feb 28 13:21:36 2019 +0000
@@ -19,7 +19,7 @@
 class AutoExpireFlashBag implements FlashBagInterface
 {
     private $name = 'flashes';
-    private $flashes = array('display' => array(), 'new' => array());
+    private $flashes = ['display' => [], 'new' => []];
     private $storageKey;
 
     /**
@@ -53,8 +53,8 @@
         // The logic: messages from the last request will be stored in new, so we move them to previous
         // This request we will show what is in 'display'.  What is placed into 'new' this time round will
         // be moved to display next time round.
-        $this->flashes['display'] = array_key_exists('new', $this->flashes) ? $this->flashes['new'] : array();
-        $this->flashes['new'] = array();
+        $this->flashes['display'] = array_key_exists('new', $this->flashes) ? $this->flashes['new'] : [];
+        $this->flashes['new'] = [];
     }
 
     /**
@@ -68,7 +68,7 @@
     /**
      * {@inheritdoc}
      */
-    public function peek($type, array $default = array())
+    public function peek($type, array $default = [])
     {
         return $this->has($type) ? $this->flashes['display'][$type] : $default;
     }
@@ -78,13 +78,13 @@
      */
     public function peekAll()
     {
-        return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : array();
+        return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : [];
     }
 
     /**
      * {@inheritdoc}
      */
-    public function get($type, array $default = array())
+    public function get($type, array $default = [])
     {
         $return = $default;
 
@@ -106,7 +106,7 @@
     public function all()
     {
         $return = $this->flashes['display'];
-        $this->flashes['display'] = array();
+        $this->flashes['display'] = [];
 
         return $return;
     }