Code Duplication    Length = 13-17 lines in 3 locations

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

@@ 1401-1417 (lines=17) @@
1398
    /**
1399
     * {@inheritdoc}
1400
     */
1401
    protected function getCreateIndexSQLFlags(Index $index)
1402
    {
1403
        $type = '';
1404
        if ($index->hasFlag('virtual')) {
1405
            $type .= 'VIRTUAL ';
1406
        }
1407
1408
        if ($index->isUnique()) {
1409
            $type .= 'UNIQUE ';
1410
        }
1411
1412
        if ($index->hasFlag('clustered')) {
1413
            $type .= 'CLUSTERED ';
1414
        }
1415
1416
        return $type;
1417
    }
1418
1419
    /**
1420
     * {@inheritdoc}

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

@@ 397-411 (lines=15) @@
394
    /**
395
     * {@inheritDoc}
396
     */
397
    protected function getCreateIndexSQLFlags(Index $index)
398
    {
399
        $type = '';
400
        if ($index->isUnique()) {
401
            $type .= 'UNIQUE ';
402
        }
403
404
        if ($index->hasFlag('clustered')) {
405
            $type .= 'CLUSTERED ';
406
        } elseif ($index->hasFlag('nonclustered')) {
407
            $type .= 'NONCLUSTERED ';
408
        }
409
410
        return $type;
411
    }
412
413
    /**
414
     * Extend unique key constraint with required filters

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

@@ 870-882 (lines=13) @@
867
    /**
868
     * {@inheritDoc}
869
     */
870
    protected function getCreateIndexSQLFlags(Index $index)
871
    {
872
        $type = '';
873
        if ($index->isUnique()) {
874
            $type .= 'UNIQUE ';
875
        } elseif ($index->hasFlag('fulltext')) {
876
            $type .= 'FULLTEXT ';
877
        } elseif ($index->hasFlag('spatial')) {
878
            $type .= 'SPATIAL ';
879
        }
880
881
        return $type;
882
    }
883
884
    /**
885
     * {@inheritDoc}