Code Duplication    Length = 7-7 lines in 2 locations

src/SQL.php 2 locations

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