Code Duplication    Length = 7-9 lines in 2 locations

lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php 1 location

@@ 1242-1250 (lines=9) @@
1239
            }
1240
        }
1241
1242
        if ( ! empty($options['primary'])) {
1243
            $flags = '';
1244
1245
            if (isset($options['primary_index']) && $options['primary_index']->hasFlag('clustered')) {
1246
                $flags = ' CLUSTERED ';
1247
            }
1248
1249
            $columnListSql .= ', PRIMARY KEY' . $flags . ' (' . implode(', ', array_unique(array_values((array) $options['primary']))) . ')';
1250
        }
1251
1252
        if ( ! empty($options['foreignKeys'])) {
1253
            foreach ((array) $options['foreignKeys'] as $definition) {

lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php 1 location

@@ 265-271 (lines=7) @@
262
            }
263
        }
264
265
        if (isset($options['primary']) && !empty($options['primary'])) {
266
            $flags = '';
267
            if (isset($options['primary_index']) && $options['primary_index']->hasFlag('nonclustered')) {
268
                $flags = ' NONCLUSTERED';
269
            }
270
            $columnListSql .= ', PRIMARY KEY' . $flags . ' (' . implode(', ', array_unique(array_values($options['primary']))) . ')';
271
        }
272
273
        $query = 'CREATE TABLE ' . $tableName . ' (' . $columnListSql;
274