Code Duplication    Length = 8-12 lines in 2 locations

src/Phinx/Db/Adapter/MysqlAdapter.php 1 location

@@ 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",

src/Phinx/Db/Adapter/OracleAdapter.php 1 location

@@ 584-595 (lines=12) @@
581
    {
582
        $indexes = $this->getIndexes($tableName);
583
584
        foreach ($indexes as $name => $index) {
585
            if ($name === $indexName) {
586
                $this->execute(
587
                    sprintf(
588
                        'DROP INDEX %s',
589
                        $this->quoteColumnName($indexName)
590
                    )
591
                );
592
593
                break;
594
            }
595
        }
596
    }
597
598
    /**