N°5809 Update laminas/laminas-mail from 2.16.0 to 2.22.0

This commit is contained in:
Pierre Goiffon
2024-01-25 17:24:43 +01:00
parent f3d3ec6ef7
commit 0f39ea8ac7
146 changed files with 4426 additions and 8899 deletions

View File

@@ -16,6 +16,11 @@ use function next;
use function reset;
use function uasort;
/**
* @template TKey of string
* @template TValue of mixed
* @template-implements Iterator<TKey, TValue>
*/
class PriorityList implements Iterator, Countable
{
public const EXTR_DATA = 0x00000001;
@@ -25,14 +30,14 @@ class PriorityList implements Iterator, Countable
/**
* Internal list of all items.
*
* @var array[]
* @var array<TKey, array{data: TValue, priority: int, serial: positive-int|0}>
*/
protected $items = [];
/**
* Serial assigned to items to preserve LIFO.
*
* @var int
* @var positive-int|0
*/
protected $serial = 0;
@@ -64,12 +69,12 @@ class PriorityList implements Iterator, Countable
/**
* Insert a new item.
*
* @param string $name
* @param mixed $value
* @param int $priority
* @param TKey $name
* @param TValue $value
* @param int $priority
* @return void
*/
public function insert($name, $value, $priority = 0)
public function insert($name, mixed $value, $priority = 0)
{
if (! isset($this->items[$name])) {
$this->count++;
@@ -85,7 +90,7 @@ class PriorityList implements Iterator, Countable
}
/**
* @param string $name
* @param TKey $name
* @param int $priority
* @return $this
* @throws Exception
@@ -105,7 +110,7 @@ class PriorityList implements Iterator, Countable
/**
* Remove a item.
*
* @param string $name
* @param TKey $name
* @return void
*/
public function remove($name)
@@ -133,8 +138,8 @@ class PriorityList implements Iterator, Countable
/**
* Get a item.
*
* @param string $name
* @return mixed
* @param TKey $name
* @return TValue|null
*/
public function get($name)
{
@@ -162,7 +167,6 @@ class PriorityList implements Iterator, Countable
* Compare the priority of two items.
*
* @param array $item1,
* @param array $item2
* @return int
*/
protected function compare(array $item1, array $item2)