Code Duplication    Length = 12-14 lines in 2 locations

Command/MigrationCommand.php 1 location

@@ 60-71 (lines=12) @@
57
        $migrationNameOrPath = $input->getArgument('migration');
58
59
        // ask user for confirmation to make changes
60
        if ($input->isInteractive() && !$input->getOption('no-interaction')) {
61
            $dialog = $this->getHelperSet()->get('dialog');
62
            if (!$dialog->askConfirmation(
63
                $output,
64
                '<question>Careful, the database will be modified. Do you want to continue Y/N ?</question>',
65
                false
66
            )
67
            ) {
68
                $output->writeln('<error>Migration change cancelled!</error>');
69
                return 0;
70
            }
71
        }
72
73
        if ($input->getOption('add')) {
74
            // will throw if a file is passed and it is not found, but not if an empty dir is passed

Command/MigrateCommand.php 1 location

@@ 144-157 (lines=14) @@
141
        $this->writeln('');
142
143
        // ask user for confirmation to make changes
144
        if ($input->isInteractive() && !$input->getOption('no-interaction')) {
145
            $dialog = $this->getHelperSet()->get('dialog');
146
            if (!$dialog->askConfirmation(
147
                $output,
148
                '<question>Careful, the database will be modified. Do you want to continue Y/N ?</question>',
149
                false
150
            )
151
            ) {
152
                $output->writeln('<error>Migration execution cancelled!</error>');
153
                return 0;
154
            }
155
        } else {
156
            $this->writeln("=============================================\n");
157
        }
158
159
        if ($input->getOption('separate-process')) {
160
            $builder = new ProcessBuilder();