Code Duplication    Length = 6-10 lines in 2 locations

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

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