When we add a type to a TypeCollection remove Unknown Type

parent e1f10f54
......@@ -47,6 +47,11 @@ final class TypeCollection extends AbstractCollection
public function addType(Type $item): self
$itemList = $this->itemList;
if (isset($itemList[Type::UNKNOWN])) {
$itemList[$item->getFqn()] = $item;
return new self(...array_values($itemList));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment