Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
29 | public function execute() |
||
30 | { |
||
31 | $migrations = $this->manager->getMigrations(); |
||
32 | $isNoMigration = true; |
||
33 | foreach ($migrations as $migration) { |
||
34 | if (!$migration->isApplied()) { |
||
35 | $isNoMigration = false; |
||
36 | $migration->up(); |
||
37 | $this->output->writeln(sprintf("<info>migrate</info> %s", $migration->getId())); |
||
38 | } |
||
39 | } |
||
40 | if ($isNoMigration) { |
||
41 | $this->output->writeln("<comment>there is no migration to migrate.</comment>"); |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 |