Code Duplication    Length = 8-8 lines in 2 locations

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

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