protected function getCasting($type)
    {
        if ($type instanceof \Doctrine\DBAL\Types\DecimalType or $type instanceof
            \Doctrine\DBAL\Types\FloatType
        ) {
            return 'double';
        } else {
            if ($type instanceof \Doctrine\DBAL\Types\IntegerType or $type instanceof \Doctrine\DBAL\Types\BigIntType or $type instanceof
                \Doctrine\DBAL\Types\SmallIntType
            ) {
                return 'int';
            }
        }
    }