Code Duplication    Length = 8-8 lines in 2 locations

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

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