diff options
author | Mario <mario@mariovavti.com> | 2021-11-09 09:10:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-11-09 09:10:19 +0000 |
commit | fe7ecede700fe04631d23f36473e697ce2b364dc (patch) | |
tree | e713fc39dba500a25cb2acf8561e286fb8b41ff0 /vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php | |
parent | 42de18d96d201d74e5df3ed1b8f6132cb00357b6 (diff) | |
parent | 089708ab9f90309a0c27ae633cf8f2604fce1170 (diff) | |
download | volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.tar.gz volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.tar.bz2 volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.zip |
Merge branch '6.4RC'6.4
Diffstat (limited to 'vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php')
-rw-r--r-- | vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php b/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php index 89d09178d..536cb6034 100644 --- a/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php +++ b/vendor/ramsey/uuid/src/Provider/Node/NodeProviderCollection.php @@ -15,14 +15,15 @@ declare(strict_types=1); namespace Ramsey\Uuid\Provider\Node; use Ramsey\Collection\AbstractCollection; -use Ramsey\Collection\CollectionInterface; use Ramsey\Uuid\Provider\NodeProviderInterface; use Ramsey\Uuid\Type\Hexadecimal; /** * A collection of NodeProviderInterface objects + * + * @extends AbstractCollection<NodeProviderInterface> */ -class NodeProviderCollection extends AbstractCollection implements CollectionInterface +class NodeProviderCollection extends AbstractCollection { public function getType(): string { @@ -36,10 +37,11 @@ class NodeProviderCollection extends AbstractCollection implements CollectionInt * a UuidInterface instance * * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + * @psalm-suppress RedundantConditionGivenDocblockType */ public function unserialize($serialized): void { - /** @var mixed[] $data */ + /** @var array<array-key, NodeProviderInterface> $data */ $data = unserialize($serialized, [ 'allowed_classes' => [ Hexadecimal::class, @@ -49,6 +51,11 @@ class NodeProviderCollection extends AbstractCollection implements CollectionInt ], ]); - $this->data = $data; + $this->data = array_filter( + $data, + function ($unserialized): bool { + return $unserialized instanceof NodeProviderInterface; + } + ); } } |