Completed
Push — master ( 357eb6...5eff20 )
by dima
02:34
created
app/Console/Commands/InstallCommand.php 3 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -4,10 +4,7 @@
 block discarded – undo
4 4
 use Symfony\Component\Console\Command\Command;
5 5
 use Symfony\Component\Console\Input\InputInterface;
6 6
 use Symfony\Component\Console\Output\OutputInterface;
7
-use Symfony\Component\Console\Input\StringInput;
8 7
 use Symfony\Component\Console\Input\ArrayInput;
9
-use Symfony\Component\Process\Process;
10
-use Symfony\Component\Process\Exception\ProcessFailedException;
11 8
 
12 9
 /**
13 10
  * Description of HelloWorldCommand
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -25,21 +25,21 @@
 block discarded – undo
25 25
     protected function execute(InputInterface $input, OutputInterface $output)
26 26
     { 
27 27
 		
28
-		$command	 = $this->getApplication()->find('config:convert');
29
-		$returnCode	 = $command->run(new ArrayInput([
30
-				'command'	 => 'config:convert'
31
-		]), $output);
28
+        $command	 = $this->getApplication()->find('config:convert');
29
+        $returnCode	 = $command->run(new ArrayInput([
30
+                'command'	 => 'config:convert'
31
+        ]), $output);
32 32
 		
33
-		$command	 = $this->getApplication()->find('packages:install');
34
-		$returnCode	 = $command->run(new ArrayInput([
35
-				'command'	 => 'packages:install'
36
-		]), $output);
33
+        $command	 = $this->getApplication()->find('packages:install');
34
+        $returnCode	 = $command->run(new ArrayInput([
35
+                'command'	 => 'packages:install'
36
+        ]), $output);
37 37
 
38
-		$command	 = $this->getApplication()->find('migration:migrate');
39
-		$returnCode	 = $command->run(new ArrayInput([
40
-				'command'	 => 'migration:migrate'
41
-		]), $output);		
38
+        $command	 = $this->getApplication()->find('migration:migrate');
39
+        $returnCode	 = $command->run(new ArrayInput([
40
+                'command'	 => 'migration:migrate'
41
+        ]), $output);		
42 42
 
43
-		$output->writeln("install completed!");
43
+        $output->writeln("install completed!");
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,18 +25,18 @@
 block discarded – undo
25 25
     protected function execute(InputInterface $input, OutputInterface $output)
26 26
     { 
27 27
 		
28
-		$command	 = $this->getApplication()->find('config:convert');
29
-		$returnCode	 = $command->run(new ArrayInput([
28
+		$command = $this->getApplication()->find('config:convert');
29
+		$returnCode = $command->run(new ArrayInput([
30 30
 				'command'	 => 'config:convert'
31 31
 		]), $output);
32 32
 		
33
-		$command	 = $this->getApplication()->find('packages:install');
34
-		$returnCode	 = $command->run(new ArrayInput([
33
+		$command = $this->getApplication()->find('packages:install');
34
+		$returnCode = $command->run(new ArrayInput([
35 35
 				'command'	 => 'packages:install'
36 36
 		]), $output);
37 37
 
38
-		$command	 = $this->getApplication()->find('migration:migrate');
39
-		$returnCode	 = $command->run(new ArrayInput([
38
+		$command = $this->getApplication()->find('migration:migrate');
39
+		$returnCode = $command->run(new ArrayInput([
40 40
 				'command'	 => 'migration:migrate'
41 41
 		]), $output);		
42 42
 
Please login to merge, or discard this patch.
app/Console/Commands/SeedBuildCommand.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -16,28 +16,28 @@
 block discarded – undo
16 16
 class SeedBuildCommand extends Command
17 17
 {
18 18
 
19
-	protected function configure()
20
-	{
21
-		$this->setName('seed:build')
22
-				->setDescription('Create seeds data')
23
-				->setDefinition(
24
-						new InputDefinition(array(
25
-					new InputOption('class', 'c', InputOption::VALUE_REQUIRED),
26
-					new InputOption('amount', 'a', InputOption::VALUE_OPTIONAL)
27
-						))
28
-		);
29
-	}
19
+    protected function configure()
20
+    {
21
+        $this->setName('seed:build')
22
+                ->setDescription('Create seeds data')
23
+                ->setDefinition(
24
+                        new InputDefinition(array(
25
+                    new InputOption('class', 'c', InputOption::VALUE_REQUIRED),
26
+                    new InputOption('amount', 'a', InputOption::VALUE_OPTIONAL)
27
+                        ))
28
+        );
29
+    }
30 30
 
31
-	protected function execute(InputInterface $input, OutputInterface $output)
32
-	{
31
+    protected function execute(InputInterface $input, OutputInterface $output)
32
+    {
33 33
 
34
-		if (!$class = $input->getOption('class')) {
35
-			$output->writeln("Class Model not set");
36
-			return;
37
-		}
34
+        if (!$class = $input->getOption('class')) {
35
+            $output->writeln("Class Model not set");
36
+            return;
37
+        }
38 38
 
39
-		$number = $input->getOption('amount');
40
-		$class::build($number > 1 ? $number : 1);
41
-		$output->writeln(sprintf("Seed %s amount %s create success!", $class, $number));
42
-	}
39
+        $number = $input->getOption('amount');
40
+        $class::build($number > 1 ? $number : 1);
41
+        $output->writeln(sprintf("Seed %s amount %s create success!", $class, $number));
42
+    }
43 43
 }
Please login to merge, or discard this patch.
app/Console/Commands/SeedResetCommand.php 3 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -17,29 +17,29 @@
 block discarded – undo
17 17
 class SeedResetCommand extends Command
18 18
 {
19 19
 
20
-	protected function configure()
21
-	{
22
-		$this->setName('seed:reset')
23
-				->setDescription('Reset all seeds data')
24
-				->setDefinition(
25
-						new InputDefinition(array(
26
-					new InputOption('class', 'c', InputOption::VALUE_REQUIRED)
27
-						))
28
-		);
29
-	}
20
+    protected function configure()
21
+    {
22
+        $this->setName('seed:reset')
23
+                ->setDescription('Reset all seeds data')
24
+                ->setDefinition(
25
+                        new InputDefinition(array(
26
+                    new InputOption('class', 'c', InputOption::VALUE_REQUIRED)
27
+                        ))
28
+        );
29
+    }
30 30
 
31
-	protected function execute(InputInterface $input, OutputInterface $output)
32
-	{
31
+    protected function execute(InputInterface $input, OutputInterface $output)
32
+    {
33 33
 	
34
-		if (!$class = $input->getOption('class')) {
35
-			$output->writeln("Class Model not set");
36
-			return;
37
-		}
34
+        if (!$class = $input->getOption('class')) {
35
+            $output->writeln("Class Model not set");
36
+            return;
37
+        }
38 38
 
39
-		if($class::reset()){
40
-			$output->writeln(sprintf("Seed %s reset success!", $class));
41
-		}
42
-		else
43
-			$output->writeln("Command seed:reset fail to execute!");
44
-	}
39
+        if($class::reset()){
40
+            $output->writeln(sprintf("Seed %s reset success!", $class));
41
+        }
42
+        else
43
+            $output->writeln("Command seed:reset fail to execute!");
44
+    }
45 45
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 			return;
37 37
 		}
38 38
 
39
-		if($class::reset()){
39
+		if ($class::reset()) {
40 40
 			$output->writeln(sprintf("Seed %s reset success!", $class));
41 41
 		}
42 42
 		else
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
 
39 39
 		if($class::reset()){
40 40
 			$output->writeln(sprintf("Seed %s reset success!", $class));
41
+		} else {
42
+					$output->writeln("Command seed:reset fail to execute!");
41 43
 		}
42
-		else
43
-			$output->writeln("Command seed:reset fail to execute!");
44 44
 	}
45 45
 }
Please login to merge, or discard this patch.