Completed
Push — master ( 2867e6...fe686a )
by dima
03:08
created
app/Console.php 4 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Symfony\Component\Console\Input\InputInterface;
7 7
 use Symfony\Component\Console\Output\OutputInterface;
8 8
 use Symfony\Component\Console\Input\InputArgument;
9
-use Symfony\Component\Console\Input\InputOption;
10 9
 use Symfony\Component\Finder\Finder;
11 10
 
12 11
 class Console extends Application
Please login to merge, or discard this patch.
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
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
@@ -39,43 +39,43 @@  discard block
 block discarded – undo
39 39
         // which is used when using the --help option
40 40
         $defaultCommands = parent::getDefaultCommands();
41 41
 
42
-       // $defaultCommands[] = new MyCommand();
43
-		$this->register('packages:install')
44
-			->setDescription('Say hello to someone on the command line.')
45
-			->setDefinition(array(
46
-				new InputArgument('name', InputArgument::OPTIONAL, 'The name of the person to say hello to.', 'Stranger'),
47
-			))
48
-			->setCode(function (InputInterface $input, OutputInterface $output) {
42
+        // $defaultCommands[] = new MyCommand();
43
+        $this->register('packages:install')
44
+            ->setDescription('Say hello to someone on the command line.')
45
+            ->setDefinition(array(
46
+                new InputArgument('name', InputArgument::OPTIONAL, 'The name of the person to say hello to.', 'Stranger'),
47
+            ))
48
+            ->setCode(function (InputInterface $input, OutputInterface $output) {
49 49
 
50
-				$finder = \Symfony\Component\Finder\Finder::create();
50
+                $finder = \Symfony\Component\Finder\Finder::create();
51 51
 
52
-				$root_path = __DIR__ . "../..";
52
+                $root_path = __DIR__ . "../..";
53 53
 
54
-				$iterator = $finder
55
-						->files()
56
-						->in($root_path . "/vendor/*/*/db");
54
+                $iterator = $finder
55
+                        ->files()
56
+                        ->in($root_path . "/vendor/*/*/db");
57 57
 
58
-				foreach ($iterator as $file) {
59
-					//print $file->getRealpath() . PHP_EOL;
58
+                foreach ($iterator as $file) {
59
+                    //print $file->getRealpath() . PHP_EOL;
60 60
 
61
-					// Dump the relative path to the file, omitting the filename
62
-					//var_dump($file->getRelativePath());
61
+                    // Dump the relative path to the file, omitting the filename
62
+                    //var_dump($file->getRelativePath());
63 63
 
64
-					// Dump the relative path to the file
65
-					//var_dump($file->getRelativePathname());
64
+                    // Dump the relative path to the file
65
+                    //var_dump($file->getRelativePathname());
66 66
 
67
-					if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) {
68
-					   echo sprintf("error copy migration %s..." . PHP_EOL, $file->getRelativePathname());
69
-					}
70
-					else{
71
-						echo sprintf("copy migration %s" . PHP_EOL, $file->getRelativePathname());
72
-					}
73
-				}
67
+                    if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) {
68
+                        echo sprintf("error copy migration %s..." . PHP_EOL, $file->getRelativePathname());
69
+                    }
70
+                    else{
71
+                        echo sprintf("copy migration %s" . PHP_EOL, $file->getRelativePathname());
72
+                    }
73
+                }
74 74
 
75
-				echo "completed!" . PHP_EOL;				
75
+                echo "completed!" . PHP_EOL;				
76 76
 				
77 77
 				
78
-			});		
78
+            });		
79 79
 
80 80
         return $defaultCommands;
81 81
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 			->setDefinition(array(
46 46
 				new InputArgument('name', InputArgument::OPTIONAL, 'The name of the person to say hello to.', 'Stranger'),
47 47
 			))
48
-			->setCode(function (InputInterface $input, OutputInterface $output) {
48
+			->setCode(function(InputInterface $input, OutputInterface $output) {
49 49
 
50 50
 				$finder = \Symfony\Component\Finder\Finder::create();
51 51
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 					if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) {
68 68
 					   echo sprintf("error copy migration %s..." . PHP_EOL, $file->getRelativePathname());
69 69
 					}
70
-					else{
70
+					else {
71 71
 						echo sprintf("copy migration %s" . PHP_EOL, $file->getRelativePathname());
72 72
 					}
73 73
 				}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@
 block discarded – undo
66 66
 
67 67
 					if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) {
68 68
 					   echo sprintf("error copy migration %s..." . PHP_EOL, $file->getRelativePathname());
69
-					}
70
-					else{
69
+					} else{
71 70
 						echo sprintf("copy migration %s" . PHP_EOL, $file->getRelativePathname());
72 71
 					}
73 72
 				}
Please login to merge, or discard this patch.