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