mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Assure unserialized NodeProviderCollection contains only valid elements
This stops Psalm from complaining about MixedPropertyTypeCoercion
This commit is contained in:
@@ -50,6 +50,11 @@ class NodeProviderCollection extends AbstractCollection
|
||||
],
|
||||
]);
|
||||
|
||||
$this->data = $data;
|
||||
$this->data = array_filter(
|
||||
$data,
|
||||
function ($unserialized): bool {
|
||||
return $unserialized instanceof NodeProviderInterface;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user