upgraded dependencies

This commit is contained in:
RafficMohammed
2023-01-08 01:59:16 +05:30
parent 51056e3aad
commit f9ae387337
6895 changed files with 133617 additions and 178680 deletions

View File

@@ -38,7 +38,7 @@ class AutoExpireFlashBag implements FlashBagInterface
return $this->name;
}
public function setName($name)
public function setName(string $name)
{
$this->name = $name;
}
@@ -60,7 +60,7 @@ class AutoExpireFlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function add($type, $message)
public function add(string $type, $message)
{
$this->flashes['new'][$type][] = $message;
}
@@ -68,7 +68,7 @@ class AutoExpireFlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function peek($type, array $default = [])
public function peek(string $type, array $default = [])
{
return $this->has($type) ? $this->flashes['display'][$type] : $default;
}
@@ -84,7 +84,7 @@ class AutoExpireFlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function get($type, array $default = [])
public function get(string $type, array $default = [])
{
$return = $default;
@@ -122,7 +122,7 @@ class AutoExpireFlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function set($type, $messages)
public function set(string $type, $messages)
{
$this->flashes['new'][$type] = (array) $messages;
}
@@ -130,7 +130,7 @@ class AutoExpireFlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function has($type)
public function has(string $type)
{
return \array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type];
}

View File

@@ -38,7 +38,7 @@ class FlashBag implements FlashBagInterface
return $this->name;
}
public function setName($name)
public function setName(string $name)
{
$this->name = $name;
}
@@ -54,7 +54,7 @@ class FlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function add($type, $message)
public function add(string $type, $message)
{
$this->flashes[$type][] = $message;
}
@@ -62,7 +62,7 @@ class FlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function peek($type, array $default = [])
public function peek(string $type, array $default = [])
{
return $this->has($type) ? $this->flashes[$type] : $default;
}
@@ -78,7 +78,7 @@ class FlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function get($type, array $default = [])
public function get(string $type, array $default = [])
{
if (!$this->has($type)) {
return $default;
@@ -105,7 +105,7 @@ class FlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function set($type, $messages)
public function set(string $type, $messages)
{
$this->flashes[$type] = (array) $messages;
}
@@ -121,7 +121,7 @@ class FlashBag implements FlashBagInterface
/**
* {@inheritdoc}
*/
public function has($type)
public function has(string $type)
{
return \array_key_exists($type, $this->flashes) && $this->flashes[$type];
}

View File

@@ -23,18 +23,16 @@ interface FlashBagInterface extends SessionBagInterface
/**
* Adds a flash message for the given type.
*
* @param string $type
* @param mixed $message
* @param mixed $message
*/
public function add($type, $message);
public function add(string $type, $message);
/**
* Registers one or more messages for a given type.
*
* @param string $type
* @param string|array $messages
*/
public function set($type, $messages);
public function set(string $type, $messages);
/**
* Gets flash messages for a given type.
@@ -44,7 +42,7 @@ interface FlashBagInterface extends SessionBagInterface
*
* @return array
*/
public function peek($type, array $default = []);
public function peek(string $type, array $default = []);
/**
* Gets all flash messages.
@@ -56,12 +54,11 @@ interface FlashBagInterface extends SessionBagInterface
/**
* Gets and clears flash from the stack.
*
* @param string $type
* @param array $default Default value if $type does not exist
* @param array $default Default value if $type does not exist
*
* @return array
*/
public function get($type, array $default = []);
public function get(string $type, array $default = []);
/**
* Gets and clears flashes from the stack.
@@ -78,11 +75,9 @@ interface FlashBagInterface extends SessionBagInterface
/**
* Has flash messages for a given type?
*
* @param string $type
*
* @return bool
*/
public function has($type);
public function has(string $type);
/**
* Returns a list of all defined types.