Code Duplication    Length = 7-7 lines in 2 locations

src/SQL.php 2 locations

@@ 66-72 (lines=7) @@
63
            }
64
            $options['length'] = $field['maxLength'];
65
            $options['default'] = $field['default'];
66
            if ($field['index'] !== null) {
67
                if ( $field['index_type'] == 'unique' ) {
68
                    $indexes[] = new Index($collection . '_' . $field['name'] . '_UNQ', [$field['name']], true, false);
69
                } else {
70
                    $tmpIndexes[] = $field['name'];
71
                }
72
            }
73
            $columns[] = new Column($field['name'], Type::getType($field['type']), $options );
74
        }
75
@@ 100-106 (lines=7) @@
97
        $tmpIndexes = [];
98
        foreach ($indexes as $field){
99
            $field = array_merge(self::$columnDefaults, $field);
100
            if ($field['index'] !== null) {
101
                if ( $field['index_type'] == 'unique' ) {
102
                    $indexes[] = new Index($collection . '_' . $field['name'] . '_UNQ', [$field['name']], true, false);
103
                } else {
104
                    $tmpIndexes[] = $field['name'];
105
                }
106
            }
107
        }
108
        if (count($tmpIndexes) > 0) {
109
            $indexes[] = new Index($collection . '_IDX', $tmpIndexes, false, false);