private function toEntity(ClassMetadataInfo $metadata)
    {
        foreach ($this->classes as $name => $class) {
            if (!is_array($class) || $class['class'] != $metadata->getName()) {
                continue;
            }

            if (isset($class['class'])) {
                $metadata->isMappedSuperclass = false;
            }

            if (isset($class['repository_class'])) {
                $metadata->setCustomRepositoryClass($class['repository_class']);
            }
        }
    }