Code Duplication    Length = 6-8 lines in 2 locations

src/Database/Schema/MysqlSchema.php 1 location

@@ 146-153 (lines=8) @@
143
144
            return ['type' => TableSchema::TYPE_BINARY, 'length' => $length];
145
        }
146
        if (strpos($col, 'float') !== false || strpos($col, 'double') !== false) {
147
            return [
148
                'type' => TableSchema::TYPE_FLOAT,
149
                'length' => $length,
150
                'precision' => $precision,
151
                'unsigned' => $unsigned,
152
            ];
153
        }
154
        if (strpos($col, 'decimal') !== false) {
155
            return [
156
                'type' => TableSchema::TYPE_DECIMAL,

src/Database/Schema/SqlserverSchema.php 1 location

@@ 109-114 (lines=6) @@
106
        if ($col === 'bit') {
107
            return ['type' => TableSchema::TYPE_BOOLEAN, 'length' => null];
108
        }
109
        if (
110
            strpos($col, 'numeric') !== false ||
111
            strpos($col, 'money') !== false ||
112
            strpos($col, 'decimal') !== false
113
        ) {
114
            return ['type' => TableSchema::TYPE_DECIMAL, 'length' => $precision, 'precision' => $scale];
115
        }
116
117
        if ($col === 'real' || $col === 'float') {