Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 529-534 (lines=6) @@
526
            $this->getConnection()->quote($parts['table'])
527
        );
528
        $rows = $this->fetchAll($sql);
529
        foreach ($rows as $row) {
530
            if (!isset($indexes[$row['index_name']])) {
531
                $indexes[$row['index_name']] = ['columns' => []];
532
            }
533
            $indexes[$row['index_name']]['columns'][] = $row['column_name'];
534
        }
535
536
        return $indexes;
537
    }

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

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