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/Builder/BuilderCollection.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/Builder/BuilderCollection.php')
-rw-r--r-- | vendor/ramsey/uuid/src/Builder/BuilderCollection.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/vendor/ramsey/uuid/src/Builder/BuilderCollection.php b/vendor/ramsey/uuid/src/Builder/BuilderCollection.php index b3e5f1dc9..89fa1e3c8 100644 --- a/vendor/ramsey/uuid/src/Builder/BuilderCollection.php +++ b/vendor/ramsey/uuid/src/Builder/BuilderCollection.php @@ -15,7 +15,6 @@ declare(strict_types=1); namespace Ramsey\Uuid\Builder; use Ramsey\Collection\AbstractCollection; -use Ramsey\Collection\CollectionInterface; use Ramsey\Uuid\Converter\Number\GenericNumberConverter; use Ramsey\Uuid\Converter\Time\GenericTimeConverter; use Ramsey\Uuid\Converter\Time\PhpTimeConverter; @@ -27,8 +26,10 @@ use Traversable; /** * A collection of UuidBuilderInterface objects + * + * @extends AbstractCollection<UuidBuilderInterface> */ -class BuilderCollection extends AbstractCollection implements CollectionInterface +class BuilderCollection extends AbstractCollection { public function getType(): string { @@ -52,10 +53,11 @@ class BuilderCollection extends AbstractCollection implements CollectionInterfac * a UuidInterface instance * * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint + * @psalm-suppress RedundantConditionGivenDocblockType */ public function unserialize($serialized): void { - /** @var mixed[] $data */ + /** @var array<array-key, UuidBuilderInterface> $data */ $data = unserialize($serialized, [ 'allowed_classes' => [ BrickMathCalculator::class, @@ -68,6 +70,11 @@ class BuilderCollection extends AbstractCollection implements CollectionInterfac ], ]); - $this->data = $data; + $this->data = array_filter( + $data, + function ($unserialized): bool { + return $unserialized instanceof UuidBuilderInterface; + } + ); } } |