Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 559-566 (lines=8) @@
556
        $indexes = $this->getIndexes($tableName);
557
        $columns = array_map('strtolower', $columns);
558
559
        foreach ($indexes as $indexName => $index) {
560
            if ($columns == $index['columns']) {
561
                return new AlterInstructions([sprintf(
562
                    'DROP INDEX %s',
563
                    $this->quoteColumnName($indexName)
564
                )]);
565
            }
566
        }
567
568
        throw new \InvalidArgumentException(sprintf(
569
            "The specified index on columns '%s' does not exist",
@@ 582-589 (lines=8) @@
579
580
        $indexes = $this->getIndexes($tableName);
581
582
        foreach ($indexes as $name => $index) {
583
            if ($name === $indexName) {
584
                return new AlterInstructions([sprintf(
585
                    'DROP INDEX %s',
586
                    $this->quoteColumnName($indexName)
587
                )]);
588
            }
589
        }
590
591
        throw new \InvalidArgumentException(sprintf(
592
            "The specified index name '%s' does not exist",