Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 644-651 (lines=8) @@
641
        $indexes = $this->getIndexes($tableName);
642
        $columns = array_map('strtolower', $columns);
643
644
        foreach ($indexes as $indexName => $index) {
645
            if ($columns == $index['columns']) {
646
                return new AlterInstructions([sprintf(
647
                    'DROP INDEX %s',
648
                    $this->quoteColumnName($indexName)
649
                )]);
650
            }
651
        }
652
653
        throw new \InvalidArgumentException(sprintf(
654
            "The specified index on columns '%s' does not exist",
@@ 667-674 (lines=8) @@
664
665
        $indexes = $this->getIndexes($tableName);
666
667
        foreach ($indexes as $name => $index) {
668
            if ($name === $indexName) {
669
                return new AlterInstructions([sprintf(
670
                    'DROP INDEX %s',
671
                    $this->quoteColumnName($indexName)
672
                )]);
673
            }
674
        }
675
676
        throw new \InvalidArgumentException(sprintf(
677
            "The specified index name '%s' does not exist",