Doctrine/DoctrineUtils.php
public static function getIdentifierType(ClassMetadata $targetEntity)
    {
        $identifier = self::getIdentifier($targetEntity);
        $type = $targetEntity->getTypeOfField($identifier);

        if ($type instanceof Type) {
            return $type;
        }

        if (\is_string($type)) {
            return Type::getType($type);
        }

        $msg = 'The Doctrine DBAL type is not found for "%s::%s" identifier';

        throw new RuntimeException(sprintf($msg, $targetEntity->getName(), $identifier));
    }
public static function getIdentifierType(ClassMetadata $targetEntity)
    {
        $identifier = self::getIdentifier($targetEntity);
        $type = $targetEntity->getTypeOfField($identifier);

        if ($type instanceof Type) {
            return $type;
        }

        if (\is_string($type)) {
            return Type::getType($type);
        }

        $msg = 'The Doctrine DBAL type is not found for "%s::%s" identifier';

        throw new RuntimeException(sprintf($msg, $targetEntity->getName(), $identifier));
    }
public static function getIdentifierType ( ClassMetadata $ targetEntity ) { $ identifier = self :: getIdentifier ( $ targetEntity ) ; $ type = $ targetEntity -> getTypeOfField ( $ identifier ) ; if ( $ type instanceof Type ) { return $ type ; } if ( \ is_string ( $ type ) ) { return Type :: getType ( $ type ) ; } $ msg = 'The Doctrine DBAL type is not found for "%s::%s" identifier' ; throw new RuntimeException ( sprintf ( $ msg , $ targetEntity -> getName ( ) , $ identifier ) ) ; }
Get the dbal identifier type.

@param ClassMetadata $targetEntity The target entity

@throws RuntimeException When the doctrine dbal type is not found

@return Type
Get the dbal identifier type .