Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 488-493 (lines=6) @@
485
    {
486
        $indexes = [];
487
        $rows = $this->fetchAll(sprintf('SHOW INDEXES FROM %s', $this->quoteTableName($tableName)));
488
        foreach ($rows as $row) {
489
            if (!isset($indexes[$row['Key_name']])) {
490
                $indexes[$row['Key_name']] = ['columns' => []];
491
            }
492
            $indexes[$row['Key_name']]['columns'][] = strtolower($row['Column_name']);
493
        }
494
        return $indexes;
495
    }
496

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

@@ 535-540 (lines=6) @@
532
            $this->getConnection()->quote($parts['table'])
533
        );
534
        $rows = $this->fetchAll($sql);
535
        foreach ($rows as $row) {
536
            if (!isset($indexes[$row['index_name']])) {
537
                $indexes[$row['index_name']] = ['columns' => []];
538
            }
539
            $indexes[$row['index_name']]['columns'][] = $row['column_name'];
540
        }
541
        return $indexes;
542
    }
543