Code Duplication    Length = 12-14 lines in 2 locations

Command/MigrateCommand.php 1 location

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

Command/MigrationCommand.php 1 location

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