src/Filter/Setting/FilterSettingFactory.php
public function addTypeFactory($factory)
    {
        $typeName = $factory->getTypeName();
        if (isset($this->typeFactories[$typeName])) {
            throw new \RuntimeException('Filter type ' . $typeName . ' is already registered.');
        }
        $this->typeFactories[$typeName] = $factory;

        return $this;
    }
public function addTypeFactory($factory)
    {
        $typeName = $factory->getTypeName();
        if (isset($this->typeFactories[$typeName])) {
            throw new \RuntimeException('Filter type ' . $typeName . ' is already registered.');
        }
        $this->typeFactories[$typeName] = $factory;

        return $this;
    }
{@inheritdoc}

@throws \RuntimeException When the type is already registered.