Code Duplication    Length = 8-8 lines in 2 locations

src/Phinx/Db/Adapter/MysqlAdapter.php 2 locations

@@ 648-655 (lines=8) @@
645
        $indexes = $this->getIndexes($tableName);
646
        $columns = array_map('strtolower', $columns);
647
648
        foreach ($indexes as $indexName => $index) {
649
            if ($columns == $index['columns']) {
650
                return new AlterInstructions([sprintf(
651
                    'DROP INDEX %s',
652
                    $this->quoteColumnName($indexName)
653
                )]);
654
            }
655
        }
656
657
        throw new InvalidArgumentException(sprintf(
658
            "The specified index on columns '%s' does not exist",
@@ 672-679 (lines=8) @@
669
    {
670
        $indexes = $this->getIndexes($tableName);
671
672
        foreach ($indexes as $name => $index) {
673
            if ($name === $indexName) {
674
                return new AlterInstructions([sprintf(
675
                    'DROP INDEX %s',
676
                    $this->quoteColumnName($indexName)
677
                )]);
678
            }
679
        }
680
681
        throw new InvalidArgumentException(sprintf(
682
            "The specified index name '%s' does not exist",