diff options
author | mjfriaza <mjfriaza@disroot.org> | 2022-05-17 13:44:06 +0200 |
---|---|---|
committer | mjfriaza <mjfriaza@disroot.org> | 2022-05-17 13:44:06 +0200 |
commit | a75c61d71efebf43713026200aa0f513bd7eef09 (patch) | |
tree | 909048adeaa329813e2530d43626ed3bd711bc25 /vendor/ramsey/uuid/src/Builder/BuilderCollection.php | |
parent | 481ecee9e87342ca7a1217395085e95d1a3b61ea (diff) | |
parent | 0d0f73fb67bbfcc53058cefded85ac36f951c7a7 (diff) | |
download | volse-hubzilla-a75c61d71efebf43713026200aa0f513bd7eef09.tar.gz volse-hubzilla-a75c61d71efebf43713026200aa0f513bd7eef09.tar.bz2 volse-hubzilla-a75c61d71efebf43713026200aa0f513bd7eef09.zip |
Merge remote-tracking branch 'upstream/dev' into dev
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; + } + ); } } |