updated-packages
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Flash;
|
||||
class AutoExpireFlashBag implements FlashBagInterface
|
||||
{
|
||||
private $name = 'flashes';
|
||||
private $flashes = array('display' => array(), 'new' => array());
|
||||
private $flashes = ['display' => [], 'new' => []];
|
||||
private $storageKey;
|
||||
|
||||
/**
|
||||
@@ -53,8 +53,8 @@ class AutoExpireFlashBag implements FlashBagInterface
|
||||
// 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 @@ class AutoExpireFlashBag implements FlashBagInterface
|
||||
/**
|
||||
* {@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 @@ class AutoExpireFlashBag implements FlashBagInterface
|
||||
*/
|
||||
public function peekAll()
|
||||
{
|
||||
return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : array();
|
||||
return \array_key_exists('display', $this->flashes) ? $this->flashes['display'] : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get($type, array $default = array())
|
||||
public function get($type, array $default = [])
|
||||
{
|
||||
$return = $default;
|
||||
|
||||
@@ -106,7 +106,7 @@ class AutoExpireFlashBag implements FlashBagInterface
|
||||
public function all()
|
||||
{
|
||||
$return = $this->flashes['display'];
|
||||
$this->flashes['display'] = array();
|
||||
$this->flashes['display'] = [];
|
||||
|
||||
return $return;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ class AutoExpireFlashBag implements FlashBagInterface
|
||||
*/
|
||||
public function has($type)
|
||||
{
|
||||
return array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type];
|
||||
return \array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user