Code Duplication    Length = 7-7 lines in 2 locations

src/SQL.php 2 locations

@@ 55-61 (lines=7) @@
52
            }
53
            $options['length'] = $field['maxLength'];
54
            $options['default'] = $field['default'];
55
            if ($field['index'] !== null) {
56
                if ( $field['index_type'] == 'unique' ) {
57
                    $indexes[] = new Index($collection . '_' . $field['name'] . '_UNQ', [$field['name']], true, false);
58
                } else {
59
                    $tmpIndexes[] = $field['name'];
60
                }
61
            }
62
63
            $columns[] = new Column($field['name'], Type::getType($field['type']), $options );
64
        }
@@ 94-100 (lines=7) @@
91
        $tmpIndexes = [];
92
        foreach ($indexes as $field){
93
            $field = array_merge(self::$columnDefaults, $field);
94
            if ($field['index'] !== null) {
95
                if ( $field['index_type'] == 'unique' ) {
96
                    $indexes[] = new Index($collection . '_' . $field['name'] . '_UNQ', [$field['name']], true, false);
97
                } else {
98
                    $tmpIndexes[] = $field['name'];
99
                }
100
            }
101
        }
102
        if (count($tmpIndexes) > 0) {
103
            $indexes[] = new Index($collection . '_IDX', $tmpIndexes, false, false);