Code Duplication    Length = 6-10 lines in 2 locations

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

@@ 868-873 (lines=6) @@
865
        $instructions = $this->beginAlterByCopyTable($table->getName());
866
867
        $tableName = $table->getName();
868
        $instructions->addPostStep(function ($state) use ($column) {
869
            $sql = preg_replace("/(`$column`)\s+\w+\s+((NOT )?NULL)/", '$1 INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT', $state['createSQL'], 1);
870
            $this->execute($sql);
871
872
            return $state;
873
        });
874
875
        $instructions->addPostStep(function ($state) {
876
            $columns = $this->fetchAll(sprintf('pragma table_info(%s)', $this->quoteTableName($state['tmpTableName'])));
@@ 901-910 (lines=10) @@
898
            return $newState + $state;
899
        });
900
901
        $instructions->addPostStep(function ($state) {
902
            $search = "/(,?\s*PRIMARY KEY\s*\([^\)]*\)|\s+PRIMARY KEY(\s+AUTOINCREMENT)?)/";
903
            $sql = preg_replace($search, '', $state['createSQL'], 1);
904
905
            if ($sql) {
906
                $this->execute($sql);
907
            }
908
909
            return $state;
910
        });
911
912
        return $this->copyAndDropTmpTable($instructions, $table->getName());
913
    }