Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 531-536 (lines=6) @@
528
    {
529
        $indexes = [];
530
        $rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName)));
531
        foreach ($rows as $row) {
532
            if (!isset($indexes[$row['Key_name']])) {
533
                $indexes[$row['Key_name']] = ['columns' => []];
534
            }
535
            $indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']);
536
        }
537
538
        return $indexes;
539
    }

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

@@ 631-636 (lines=6) @@
628
            $this->getConnection()->quote($parts['table'])
629
        );
630
        $rows = $this->fetchAll($sql);
631
        foreach ($rows as $row) {
632
            if (!isset($indexes[$row['index_name']])) {
633
                $indexes[$row['index_name']] = ['columns' => []];
634
            }
635
            $indexes[$row['index_name']]['columns'][] = $row['column_name'];
636
        }
637
638
        return $indexes;
639
    }