Code Duplication    Length = 7-7 lines in 2 locations

src/SQL.php 2 locations

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