| Conditions | 3 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 23 | { |
||
| 24 | $finder = \Symfony\Component\Finder\Finder::create(); |
||
| 25 | |||
| 26 | $root_path = __DIR__ . "../../../.."; |
||
| 27 | |||
| 28 | $iterator = $finder |
||
| 29 | ->files() |
||
| 30 | ->in($root_path . "/vendor/*/*/db"); |
||
| 31 | |||
| 32 | foreach ($iterator as $file) { |
||
| 33 | |||
| 34 | if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) { |
||
| 35 | $output->writeln( sprintf("error copy migration %s...", $file->getRelativePathname()) ); |
||
| 36 | } |
||
| 37 | else{ |
||
| 38 | $output->writeln( sprintf("copy migration %s", $file->getRelativePathname()) ); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | $output->writeln("completed!"); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |