private function normalizeEntityConfig($entityName, $entityConfig)
    {
        // normalize config formats #1 and #2 to use the 'class' option as config format #3
        if (!\is_array($entityConfig)) {
            $entityConfig = ['class' => $entityConfig];
        }

        // if config format #3 is used, ensure that it defines the 'class' option
        if (!isset($entityConfig['class'])) {
            throw new \RuntimeException(\sprintf('The "%s" entity must define its associated Doctrine entity class using the "class" option.', $entityName));
        }

        return $entityConfig;
    }
private function normalizeEntityConfig($entityName, $entityConfig)
    {
        // normalize config formats #1 and #2 to use the 'class' option as config format #3
        if (!\is_array($entityConfig)) {
            $entityConfig = ['class' => $entityConfig];
        }

        // if config format #3 is used, ensure that it defines the 'class' option
        if (!isset($entityConfig['class'])) {
            throw new \RuntimeException(\sprintf('The "%s" entity must define its associated Doctrine entity class using the "class" option.', $entityName));
        }

        return $entityConfig;
    }
private function normalizeEntityConfig ( $ entityName , $ entityConfig ) { // normalize config formats #1 and #2 to use the 'class' option as config format #3 if ( ! \ is_array ( $ entityConfig ) ) { $ entityConfig = [ 'class' => $ entityConfig ] ; } // if config format #3 is used, ensure that it defines the 'class' option if ( ! isset ( $ entityConfig [ 'class' ] ) ) { throw new \ RuntimeException ( \ sprintf ( 'The "%s" entity must define its associated Doctrine entity class using the "class" option.' , $ entityName ) ) ; } return $ entityConfig ; }
Transforms the two simple configuration formats into the full expanded
configuration. This allows to reuse the same method to process any of the
different configuration formats.

These are the two simple formats allowed:

# Config format #1: no custom entity name
easy_admin:
entities:
- AppBundle\Entity\User

# Config format #2: simple config with custom entity name
easy_admin:
entities:
User: AppBundle\Entity\User

And this is the full expanded configuration syntax generated by this method:

# Config format #3: expanded entity configuration with 'class' parameter
easy_admin:
entities:
User:
class: AppBundle\Entity\User

@param mixed $entityName
@param mixed $entityConfig

@return array

@throws \RuntimeException
Transforms the two simple configuration formats into the full expanded configuration . This allows to reuse the same method to process any of the different configuration formats .