Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 7 |
Ratio | 38.89 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
37 | 4 | public function handle(Migrator $migrator) |
|
38 | { |
||
39 | 4 | if (!$this->confirmToProceed()) { |
|
40 | 1 | return; |
|
41 | } |
||
42 | |||
43 | 3 | $migrator->makeLogTable(); |
|
44 | |||
45 | 3 | $installed_migrations = $migrator->installedMigrationsByDesc(); |
|
46 | |||
47 | 3 | View Code Duplication | foreach ($installed_migrations as $group => $migrations) { |
48 | 1 | foreach ($migrations as $data) { |
|
49 | 1 | $this->infoDowngrade($group, $data->version, $data->class); |
|
50 | |||
51 | 1 | $migrator->doDowngrade($group, $data->version); |
|
52 | } |
||
53 | } |
||
54 | 3 | } |
|
55 | } |
||
56 |