protected function getDriverImplementation(string $type, array $paths): DriverInterface
    {
        switch ($type) {
            case DriverFactoryInterface::DRIVER_ANNOTATION:
                return $this->getAnnotationDriver($paths);

            case DriverFactoryInterface::DRIVER_PHP:
                return $this->getPhpDriver($paths);

            case DriverFactoryInterface::DRIVER_XML:
                return $this->getXmlDriver($paths);

            case DriverFactoryInterface::DRIVER_JSON:
                return $this->getJsonDriver($paths);

            case DriverFactoryInterface::DRIVER_YAML:
                return $this->getYamlDriver($paths);
        }

        throw new DriverException(
            \sprintf('"%s" is not a valid metadata mapping driver', $type)
        );
    }