Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 571-576 (lines=6) @@
568
    {
569
        $indexes = [];
570
        $rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName)));
571
        foreach ($rows as $row) {
572
            if (!isset($indexes[$row['Key_name']])) {
573
                $indexes[$row['Key_name']] = ['columns' => []];
574
            }
575
            $indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']);
576
        }
577
578
        return $indexes;
579
    }

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

@@ 655-660 (lines=6) @@
652
            $this->getConnection()->quote($parts['table'])
653
        );
654
        $rows = $this->fetchAll($sql);
655
        foreach ($rows as $row) {
656
            if (!isset($indexes[$row['index_name']])) {
657
                $indexes[$row['index_name']] = ['columns' => []];
658
            }
659
            $indexes[$row['index_name']]['columns'][] = $row['column_name'];
660
        }
661
662
        return $indexes;
663
    }