protected function removeUndeclaredTypes(array &$configuration)
    {
        foreach ($configuration as $index => $type) {
            if (!isset($this->types[$type])) {
                unset($configuration[$index]);
            }
        }
    }