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

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