Code Duplication    Length = 6-6 lines in 2 locations

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

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

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

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