private function getConstantValue(\CG\Generator\PhpConstant $constant)
    {
        if (null !== $value = $constant->getValue()) {
            return $value;
        }

        if ($constant->hasAttribute('type')) {
            switch ($constant->getAttribute('type')) {
                case 'int':
                case 'integer':
                    return 0;

                case 'double':
                case 'float':
                    return 0.1;

                case 'bool':
                case 'boolean':
                    return true;

                case 'string':
                    return 'dummy';

                case 'int/float/bool/enum':
                case '':
                    return null;

                default:
                    throw new \RuntimeException(sprintf('Unknown constant type "%s".', $constant->getAttribute('type')));
            }
        }

        return null;
    }