Conditions | 6 |
Paths | 9 |
Total Lines | 23 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function perform(): void |
||
28 | { |
||
29 | if (!$this->verifyEnvironment()) { |
||
30 | return; |
||
31 | } |
||
32 | |||
33 | $this->migrator->configure(); |
||
34 | |||
35 | $found = false; |
||
36 | $count = $this->option('one') ? 1 : PHP_INT_MAX; |
||
37 | |||
38 | while ($count > 0 && ($migration = $this->migrator->run())) { |
||
39 | $found = true; |
||
40 | $count--; |
||
41 | |||
42 | $this->sprintf( |
||
43 | "<info>Migration <comment>%s</comment> was successfully executed.</info>\n", |
||
44 | $migration->getState()->getName() |
||
45 | ); |
||
46 | } |
||
47 | |||
48 | if (!$found) { |
||
49 | $this->writeln('<fg=red>No outstanding migrations were found.</fg=red>'); |
||
50 | } |
||
53 |