Code Duplication    Length = 6-10 lines in 2 locations

src/Phinx/Db/Adapter/SQLiteAdapter.php 2 locations

@@ 887-892 (lines=6) @@
884
        $instructions = $this->beginAlterByCopyTable($table->getName());
885
886
        $tableName = $table->getName();
887
        $instructions->addPostStep(function ($state) use ($column) {
888
            $sql = preg_replace("/(`$column`)\s+\w+\s+((NOT )?NULL)/", '$1 INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT', $state['createSQL'], 1);
889
            $this->execute($sql);
890
891
            return $state;
892
        });
893
894
        $instructions->addPostStep(function ($state) {
895
            $columns = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($state['tmpTableName'])));
@@ 919-928 (lines=10) @@
916
            return $newState + $state;
917
        });
918
919
        $instructions->addPostStep(function ($state) {
920
            $search = "/(,?\s*PRIMARY KEY\s*\([^\)]*\)|\s+PRIMARY KEY(\s+AUTOINCREMENT)?)/";
921
            $sql = preg_replace($search, '', $state['createSQL'], 1);
922
923
            if ($sql) {
924
                $this->execute($sql);
925
            }
926
927
            return $state;
928
        });
929
930
        $instructions = $this->copyAndDropTmpTable($instructions, $tableName);
931