protected function getEntityClassName($name)
    {
        $repositoryName = str_replace('Repository/', '', $name);
        $nameParts      = explode('/', $repositoryName);

        $namespace = $nameParts[0];
        $entity    = isset($nameParts[1]) ? $nameParts[1] : substr($namespace, 0, -1);
        $class     = "\\$namespace\\Entity\\$entity";

        return $class;
    }