Code Duplication    Length = 6-6 lines in 2 locations

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
542
        return $indexes;
543
    }

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

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