Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 541-548 (lines=8) @@
538
        $indexes = $this->getIndexes($tableName);
539
        $columns = array_map('strtolower', $columns);
540
541
        foreach ($indexes as $indexName => $index) {
542
            if ($columns == $index['columns']) {
543
                return new AlterInstructions([sprintf(
544
                    'DROP INDEX %s',
545
                    $this->quoteColumnName($indexName)
546
                )]);
547
            }
548
        }
549
550
        throw new \InvalidArgumentException(sprintf(
551
            "The specified index on columns '%s' does not exist",
@@ 564-571 (lines=8) @@
561
562
        $indexes = $this->getIndexes($tableName);
563
564
        foreach ($indexes as $name => $index) {
565
            if ($name === $indexName) {
566
                return new AlterInstructions([sprintf(
567
                    'DROP INDEX %s',
568
                    $this->quoteColumnName($indexName)
569
                )]);
570
            }
571
        }
572
573
        throw new \InvalidArgumentException(sprintf(
574
            "The specified index name '%s' does not exist",