Can completely be simplified into:

```$em->getClassMetadata($alias)->getName```

The metadata factory already handles namespaces. No need for additional function calls