aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid/src/Builder
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ramsey/uuid/src/Builder')
-rw-r--r--vendor/ramsey/uuid/src/Builder/BuilderCollection.php15
-rw-r--r--vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php2
-rw-r--r--vendor/ramsey/uuid/src/Builder/FallbackBuilder.php1
3 files changed, 12 insertions, 6 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;
+ }
+ );
}
}
diff --git a/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php b/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php
index 2af4e867d..7c4a6f837 100644
--- a/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php
+++ b/vendor/ramsey/uuid/src/Builder/DefaultUuidBuilder.php
@@ -21,6 +21,6 @@ use Ramsey\Uuid\Rfc4122\UuidBuilder as Rfc4122UuidBuilder;
*
* @psalm-immutable
*/
-class DefaultUuidBuilder extends Rfc4122UuidBuilder implements UuidBuilderInterface
+class DefaultUuidBuilder extends Rfc4122UuidBuilder
{
}
diff --git a/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php b/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php
index cfd4665ac..470d2f755 100644
--- a/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php
+++ b/vendor/ramsey/uuid/src/Builder/FallbackBuilder.php
@@ -55,7 +55,6 @@ class FallbackBuilder implements UuidBuilderInterface
{
$lastBuilderException = null;
- /** @var UuidBuilderInterface $builder */
foreach ($this->builders as $builder) {
try {
return $builder->build($codec, $bytes);