Code Duplication    Length = 8-8 lines in 2 locations

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

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