Code Duplication    Length = 6-6 lines in 2 locations

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
    }

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

@@ 524-529 (lines=6) @@
521
    {
522
        $indexes = [];
523
        $rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName)));
524
        foreach ($rows as $row) {
525
            if (!isset($indexes[$row['Key_name']])) {
526
                $indexes[$row['Key_name']] = ['columns' => []];
527
            }
528
            $indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']);
529
        }
530
531
        return $indexes;
532
    }