Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 473-478 (lines=6) @@
470
    {
471
        $indexes = [];
472
        $rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName)));
473
        foreach ($rows as $row) {
474
            if (!isset($indexes[$row['Key_name']])) {
475
                $indexes[$row['Key_name']] = ['columns' => []];
476
            }
477
            $indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']);
478
        }
479
480
        return $indexes;
481
    }

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

@@ 572-577 (lines=6) @@
569
            $this->getConnection()->quote($parts['table'])
570
        );
571
        $rows = $this->fetchAll($sql);
572
        foreach ($rows as $row) {
573
            if (!isset($indexes[$row['index_name']])) {
574
                $indexes[$row['index_name']] = ['columns' => []];
575
            }
576
            $indexes[$row['index_name']]['columns'][] = $row['column_name'];
577
        }
578
579
        return $indexes;
580
    }