code: 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;
      }
docs: Gets an entity class name from the requested service name.
  
  @param string $name
  
  @return string