Code Duplication    Length = 6-6 lines in 2 locations

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

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

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

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