Code Duplication    Length = 9-13 lines in 2 locations

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

@@ 563-575 (lines=13) @@
560
        $indexes = $this->getIndexes($tableName);
561
        $columns = array_map('strtoupper', $columns);
562
563
        foreach ($indexes as $indexName => $index) {
564
            $a = array_diff($columns, $index['columns']);
565
            if (empty($a)) {
566
                $this->execute(
567
                    sprintf(
568
                        'DROP INDEX %s',
569
                        $this->quoteColumnName($indexName)
570
                    )
571
                );
572
573
                break;
574
            }
575
        }
576
    }
577
578
    /**

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

@@ 649-657 (lines=9) @@
646
        $columns = array_map('strtolower', $columns);
647
        $instructions = new AlterInstructions();
648
649
        foreach ($indexes as $index) {
650
            $a = array_diff($columns, $index['columns']);
651
            if (empty($a)) {
652
                $instructions->addPostStep(sprintf(
653
                    'DROP INDEX %s',
654
                    $this->quoteColumnName($index['index'])
655
                ));
656
            }
657
        }
658
659
        return $instructions;
660
    }