Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 619-626 (lines=8) @@
616
        $indexes = $this->getIndexes($tableName);
617
        $columns = array_map('strtolower', $columns);
618
619
        foreach ($indexes as $indexName => $index) {
620
            if ($columns == $index['columns']) {
621
                return new AlterInstructions([sprintf(
622
                    'DROP INDEX %s',
623
                    $this->quoteColumnName($indexName)
624
                )]);
625
            }
626
        }
627
628
        throw new \InvalidArgumentException(sprintf(
629
            "The specified index on columns '%s' does not exist",
@@ 642-649 (lines=8) @@
639
640
        $indexes = $this->getIndexes($tableName);
641
642
        foreach ($indexes as $name => $index) {
643
            if ($name === $indexName) {
644
                return new AlterInstructions([sprintf(
645
                    'DROP INDEX %s',
646
                    $this->quoteColumnName($indexName)
647
                )]);
648
            }
649
        }
650
651
        throw new \InvalidArgumentException(sprintf(
652
            "The specified index name '%s' does not exist",