Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 680-691 (lines=12) @@
677
678
        $instructions = $this->beginAlterByCopyTable($tableName);
679
680
        $instructions->addPostStep(function ($state) use ($column) {
681
            $sql = $state['createSQL'];
682
            $sql = preg_replace(
683
                "/\)$/",
684
                sprintf(', %s %s$1)', $this->quoteColumnName($column->getName()), $this->getColumnSqlDefinition($column)),
685
                $state['createSQL'],
686
                1
687
            );
688
            $this->execute($sql);
689
690
            return $state;
691
        });
692
693
        $instructions->addPostStep(function ($state) use ($tableName) {
694
            $newState = $this->calculateNewTableColumns($tableName, false, false);
@@ 897-907 (lines=11) @@
894
        $instructions = $this->beginAlterByCopyTable($tableName);
895
896
        $newColumnName = $newColumn->getName();
897
        $instructions->addPostStep(function ($state) use ($columnName, $newColumn) {
898
            $sql = preg_replace(
899
                sprintf("/%s(?:\/\*.*?\*\/|\([^)]+\)|'[^']*?'|[^,])+([,)])/", $this->quoteColumnName($columnName)),
900
                sprintf('%s %s$1', $this->quoteColumnName($newColumn->getName()), $this->getColumnSqlDefinition($newColumn)),
901
                $state['createSQL'],
902
                1
903
            );
904
            $this->execute($sql);
905
906
            return $state;
907
        });
908
909
        $instructions->addPostStep(function ($state) use ($columnName, $newColumnName, $tableName) {
910
            $newState = $this->calculateNewTableColumns($tableName, $columnName, $newColumnName);