| @@ -28,7 +28,7 @@ discard block | ||
| 28 | 28 |  //		exit('f'); | 
| 29 | 29 | // } | 
| 30 | 30 | |
| 31 | - /** | |
| 31 | + /** | |
| 32 | 32 | * Gets the default commands that should always be available. | 
| 33 | 33 | * | 
| 34 | 34 | * @return array An array of default Command instances | 
| @@ -63,42 +63,42 @@ discard block | ||
| 63 | 63 | |
| 64 | 64 | |
| 65 | 65 | |
| 66 | -	function __o(){ | |
| 67 | -				$this->register('packages:install') | |
| 68 | -			->setDescription('Say hello to someone on the command line.') | |
| 69 | - ->setDefinition(array( | |
| 70 | -				new InputArgument('name', InputArgument::OPTIONAL, 'The name of the person to say hello to.', 'Stranger'), | |
| 71 | - )) | |
| 72 | -			->setCode(function (InputInterface $input, OutputInterface $output) { | |
| 66 | +    function __o(){ | |
| 67 | +                $this->register('packages:install') | |
| 68 | +            ->setDescription('Say hello to someone on the command line.') | |
| 69 | + ->setDefinition(array( | |
| 70 | +                new InputArgument('name', InputArgument::OPTIONAL, 'The name of the person to say hello to.', 'Stranger'), | |
| 71 | + )) | |
| 72 | +            ->setCode(function (InputInterface $input, OutputInterface $output) { | |
| 73 | 73 | |
| 74 | - $finder = \Symfony\Component\Finder\Finder::create(); | |
| 74 | + $finder = \Symfony\Component\Finder\Finder::create(); | |
| 75 | 75 | |
| 76 | - $root_path = __DIR__ . "../.."; | |
| 76 | + $root_path = __DIR__ . "../.."; | |
| 77 | 77 | |
| 78 | - $iterator = $finder | |
| 79 | - ->files() | |
| 80 | - ->in($root_path . "/vendor/*/*/db"); | |
| 78 | + $iterator = $finder | |
| 79 | + ->files() | |
| 80 | + ->in($root_path . "/vendor/*/*/db"); | |
| 81 | 81 | |
| 82 | -				foreach ($iterator as $file) { | |
| 83 | - //print $file->getRealpath() . PHP_EOL; | |
| 82 | +                foreach ($iterator as $file) { | |
| 83 | + //print $file->getRealpath() . PHP_EOL; | |
| 84 | 84 | |
| 85 | - // Dump the relative path to the file, omitting the filename | |
| 86 | - //var_dump($file->getRelativePath()); | |
| 85 | + // Dump the relative path to the file, omitting the filename | |
| 86 | + //var_dump($file->getRelativePath()); | |
| 87 | 87 | |
| 88 | - // Dump the relative path to the file | |
| 89 | - //var_dump($file->getRelativePathname()); | |
| 88 | + // Dump the relative path to the file | |
| 89 | + //var_dump($file->getRelativePathname()); | |
| 90 | 90 | |
| 91 | -					if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) { | |
| 92 | -					   echo sprintf("error copy migration %s..." . PHP_EOL, $file->getRelativePathname()); | |
| 93 | - } | |
| 94 | -					else{ | |
| 95 | -						echo sprintf("copy migration %s" . PHP_EOL, $file->getRelativePathname()); | |
| 96 | - } | |
| 97 | - } | |
| 91 | +                    if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) { | |
| 92 | +                        echo sprintf("error copy migration %s..." . PHP_EOL, $file->getRelativePathname()); | |
| 93 | + } | |
| 94 | +                    else{ | |
| 95 | +                        echo sprintf("copy migration %s" . PHP_EOL, $file->getRelativePathname()); | |
| 96 | + } | |
| 97 | + } | |
| 98 | 98 | |
| 99 | - echo "completed!" . PHP_EOL; | |
| 99 | + echo "completed!" . PHP_EOL; | |
| 100 | 100 | |
| 101 | 101 | |
| 102 | - }); | |
| 103 | - } | |
| 102 | + }); | |
| 103 | + } | |
| 104 | 104 | } | 
| 105 | 105 | \ No newline at end of file |