public function accepts(Type $type) : bool
{
if ($type instanceof self) {
return $this->getItemType()->accepts($type->getItemType());
}
if ($type instanceof MixedType) {
return true;
}
if ($this->isNullable() && $type instanceof NullType) {
return true;
}
return false;
}