Code Duplication    Length = 17-21 lines in 2 locations

src/Phinx/Console/Command/Migrate.php 1 location

@@ 92-108 (lines=17) @@
89
90
        // run the migrations
91
        $start = microtime(true);
92
        foreach ($databases as $adapterOptions) {
93
94
            $this->getManager()->setMigrations(null);
95
96
            if (isset($adapterOptions['dbRef'])) {
97
                $this->getManager()->setDbRef($adapterOptions['dbRef']);
98
            }
99
100
            $this->outputEnvironmentInfo($adapterOptions, $output);
101
102
            if ($date !== null) {
103
                $this->getManager()->migrateToDateTime($environment, new \DateTime($date));
104
            } else {
105
                $this->getManager()->migrate($environment, $version);
106
            }
107
108
        }
109
110
        $end = microtime(true);
111
        $output->writeln('');

src/Phinx/Console/Command/SeedRun.php 1 location

@@ 105-125 (lines=21) @@
102
103
        } else {
104
105
            foreach ($databases as $adapterOptions) {
106
107
                $this->getManager()->setSeeds(null);
108
109
                if (isset($adapterOptions['dbRef'])) {
110
                    $this->getManager()->setDbRef($adapterOptions['dbRef']);
111
                }
112
113
                $this->outputEnvironmentInfo($adapterOptions, $output);
114
115
                if (empty($seedSet)) {
116
                    // run all the seed(ers)
117
                    $this->getManager()->seed($environment);
118
                } else {
119
                    // run seed(ers) specified in a comma-separated list of classes
120
                    foreach ($seedSet as $seed) {
121
                        $this->getManager()->seed($environment, trim($seed));
122
                    }
123
                }
124
125
            }
126
127
        }
128