Code Duplication    Length = 7-7 lines in 2 locations

src/SQL.php 2 locations

@@ 72-78 (lines=7) @@
69
            }
70
            $options['length'] = $field['maxLength'];
71
            $options['default'] = $field['default'];
72
            if ($field['index'] !== null) {
73
                if ( $field['index_type'] == 'unique' ) {
74
                    $indexes[] = new Index($collection . '_' . $field['name'] . '_UNQ', [$field['name']], true, false);
75
                } else {
76
                    $tmpIndexes[] = $field['name'];
77
                }
78
            }
79
80
            $columns[] = new Column($field['name'], Type::getType($field['type']), $options );
81
        }
@@ 111-117 (lines=7) @@
108
        $tmpIndexes = [];
109
        foreach ($indexes as $field){
110
            $field = array_merge(self::$columnDefaults, $field);
111
            if ($field['index'] !== null) {
112
                if ( $field['index_type'] == 'unique' ) {
113
                    $indexes[] = new Index($collection . '_' . $field['name'] . '_UNQ', [$field['name']], true, false);
114
                } else {
115
                    $tmpIndexes[] = $field['name'];
116
                }
117
            }
118
        }
119
        if (count($tmpIndexes) > 0) {
120
            $indexes[] = new Index($collection . '_IDX', $tmpIndexes, false, false);