Conditions | 4 |
Paths | 6 |
Total Lines | 21 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | protected function execute(InputInterface $input, OutputInterface $output) |
||
23 | { |
||
24 | parent::execute($input, $output); |
||
25 | |||
26 | $migrationFiles = $this->getContainer()->get('dami.migration_files'); |
||
27 | $migrationFiles->statusIntention(); |
||
28 | $rows = array(); |
||
29 | foreach ($migrationFiles->get() as $migrationFile) { |
||
30 | $status = $migrationFile->isMigrated() ? 'Migrated' : 'Not migrated'; |
||
31 | $rows[] = array($status, $migrationFile->getVersion(), $migrationFile->getName()); |
||
32 | } |
||
33 | if (count($rows) > 0) { |
||
34 | $table = $this->getHelperSet()->get('table'); |
||
35 | $table |
||
36 | ->setHeaders(array('Status', 'Version', 'Name')) |
||
37 | ->setRows($rows) |
||
38 | ->render($output); |
||
39 | } else { |
||
40 | $output->writeln(sprintf('<comment>There are no migrations.</comment>')); |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 |