Completed
Push — master ( b4fb45...fd4491 )
by dima
02:45
created
app/Console/Application.php 3 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -4,10 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Symfony\Component\Console\Application as CoreApp;
6 6
 use Symfony\Component\Console\Input\InputInterface;
7
-use Symfony\Component\Console\Output\OutputInterface;
8
-use Symfony\Component\Console\Input\InputArgument;
9
-use Symfony\Component\Console\Input\InputOption;
10
-use Symfony\Component\Finder\Finder;
11 7
 
12 8
 class Application extends CoreApp
13 9
 {
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 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
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $defaultCommands[] = new \Symfony\Component\Console\Command\HelpCommand();
43 43
 
44
-		$defaultCommands[] = new \Frameworkless\Console\Commands\TestCommand();
44
+        $defaultCommands[] = new \Frameworkless\Console\Commands\TestCommand();
45 45
 
46 46
         return $defaultCommands;
47 47
     }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	
65 65
 	
66 66
 	
67
-	function __o(){
67
+    function __o(){
68 68
 
69
-	}
69
+    }
70 70
 }
71 71
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 	
65 65
 	
66 66
 	
67
-	function __o(){
67
+	function __o() {
68 68
 
69 69
 	}
70 70
 }
71 71
\ No newline at end of file
Please login to merge, or discard this patch.
packages/core/src/Seeds/User.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -10,26 +10,26 @@
 block discarded – undo
10 10
 class User implements \Frameworkless\SeedInterface
11 11
 {
12 12
 
13
-	/**
14
-	 * 
15
-	 * @param type $id
16
-	 * @return type
17
-	 */
18
-	static public function build($id = 1)
19
-	{
20
-		$generator = \Faker\Factory::create();
21
-		$populator = new \Faker\ORM\Propel2\Populator($generator);
22
-		$populator->addEntity(\Core\Models\User\User::class, $id);
23
-		return $populator->execute();
24
-	}
13
+    /**
14
+     * 
15
+     * @param type $id
16
+     * @return type
17
+     */
18
+    static public function build($id = 1)
19
+    {
20
+        $generator = \Faker\Factory::create();
21
+        $populator = new \Faker\ORM\Propel2\Populator($generator);
22
+        $populator->addEntity(\Core\Models\User\User::class, $id);
23
+        return $populator->execute();
24
+    }
25 25
 	
26
-	/**
27
-	 * 
28
-	 * @return type
29
-	 */
30
-	public static function reset()
31
-	{
32
-		return \Core\Models\User\UserQuery::create()->deleteAll();
33
-	}
26
+    /**
27
+     * 
28
+     * @return type
29
+     */
30
+    public static function reset()
31
+    {
32
+        return \Core\Models\User\UserQuery::create()->deleteAll();
33
+    }
34 34
 
35 35
 }
Please login to merge, or discard this patch.
app/Console/Commands/SeedCommand.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -18,39 +18,39 @@
 block discarded – undo
18 18
 class SeedCommand extends Command
19 19
 {
20 20
 
21
-	protected function configure()
22
-	{
23
-		$this->setName('seed:build')
24
-				->setDescription('Create seeds data')
25
-				->setDefinition(
26
-						new InputDefinition(array(
27
-					new InputOption('class', 'c', InputOption::VALUE_REQUIRED),
28
-					new InputOption('amount', 'a', InputOption::VALUE_OPTIONAL)
29
-						))
30
-		);
31
-		$this->setName('seed:reset')
32
-				->setDescription('Reset seeds data')
33
-				->setDefinition(
34
-						new InputDefinition(array(
35
-					new InputOption('class', 'c', InputOption::VALUE_REQUIRED)
36
-						))
37
-		);
38
-	}
21
+    protected function configure()
22
+    {
23
+        $this->setName('seed:build')
24
+                ->setDescription('Create seeds data')
25
+                ->setDefinition(
26
+                        new InputDefinition(array(
27
+                    new InputOption('class', 'c', InputOption::VALUE_REQUIRED),
28
+                    new InputOption('amount', 'a', InputOption::VALUE_OPTIONAL)
29
+                        ))
30
+        );
31
+        $this->setName('seed:reset')
32
+                ->setDescription('Reset seeds data')
33
+                ->setDefinition(
34
+                        new InputDefinition(array(
35
+                    new InputOption('class', 'c', InputOption::VALUE_REQUIRED)
36
+                        ))
37
+        );
38
+    }
39 39
 
40
-	protected function execute(InputInterface $input, OutputInterface $output)
41
-	{
40
+    protected function execute(InputInterface $input, OutputInterface $output)
41
+    {
42 42
 	
43
-		if (!$class = $input->getOption('class')) {
44
-			$output->writeln("Model not set");
45
-			return;
46
-		}
43
+        if (!$class = $input->getOption('class')) {
44
+            $output->writeln("Model not set");
45
+            return;
46
+        }
47 47
 
48
-		if ($input->getArgument('command') == "seed:reset" && $class::reset()) {
49
-			$output->writeln(sprintf("Seed %s reset success!", $class));
50
-		} else {
51
-			$number = $input->getOption('amount');
52
-			$class::build($number > 1 ? $number : 1);
53
-			$output->writeln(sprintf("Seed %s amount %s create success!", $class, $number));
54
-		}
55
-	}
48
+        if ($input->getArgument('command') == "seed:reset" && $class::reset()) {
49
+            $output->writeln(sprintf("Seed %s reset success!", $class));
50
+        } else {
51
+            $number = $input->getOption('amount');
52
+            $class::build($number > 1 ? $number : 1);
53
+            $output->writeln(sprintf("Seed %s amount %s create success!", $class, $number));
54
+        }
55
+    }
56 56
 }
Please login to merge, or discard this patch.
app/Console/Commands/InstallPackagesCommand.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -21,23 +21,23 @@
 block discarded – undo
21 21
 
22 22
     protected function execute(InputInterface $input, OutputInterface $output)
23 23
     {
24
-		$finder = \Symfony\Component\Finder\Finder::create();
24
+        $finder = \Symfony\Component\Finder\Finder::create();
25 25
 
26
-		$root_path = __DIR__ . "../../../..";
26
+        $root_path = __DIR__ . "../../../..";
27 27
 
28
-		$iterator = $finder
29
-				->files()
30
-				->in($root_path . "/vendor/*/*/db");
28
+        $iterator = $finder
29
+                ->files()
30
+                ->in($root_path . "/vendor/*/*/db");
31 31
 
32
-		foreach ($iterator as $file) {
32
+        foreach ($iterator as $file) {
33 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
-		}
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 41
 		
42 42
         $output->writeln("completed!");
43 43
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
 		foreach ($iterator as $file) {
33 33
 
34 34
 			if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) {
35
-			  $output->writeln( sprintf("error copy migration %s...", $file->getRelativePathname()) );
35
+			  $output->writeln(sprintf("error copy migration %s...", $file->getRelativePathname()));
36 36
 			}
37
-			else{
38
-				$output->writeln( sprintf("copy migration %s", $file->getRelativePathname()) );
37
+			else {
38
+				$output->writeln(sprintf("copy migration %s", $file->getRelativePathname()));
39 39
 			}
40 40
 		}
41 41
 		
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@
 block discarded – undo
33 33
 
34 34
 			if (!copy($file->getRealpath(), $root_path . '/db/' . $file->getRelativePathname())) {
35 35
 			  $output->writeln( sprintf("error copy migration %s...", $file->getRelativePathname()) );
36
-			}
37
-			else{
36
+			} else{
38 37
 				$output->writeln( sprintf("copy migration %s", $file->getRelativePathname()) );
39 38
 			}
40 39
 		}
Please login to merge, or discard this patch.
app/Controllers/IndexController.php 1 patch
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -12,84 +12,84 @@
 block discarded – undo
12 12
 class IndexController
13 13
 {
14 14
 
15
-	/**
16
-	 * @var Twig_Environment
17
-	 */
18
-	private $twig;
19
-
20
-	/**
21
-	 *
22
-	 * @var \Models\User\UserRepository $UserRepository
23
-	 */
24
-	protected $UserRepository;
25
-
26
-	protected $debugbar;
27
-
28
-	/**
29
-	 * IndexController, constructed by container
30
-	 *
31
-	 * @param Twig_Environment $twig
32
-	 */
33
-	public function __construct(
34
-	Twig_Environment $twig, UserRepository $UserRepository, StandardDebugBar $debugbar, Logger $logger
35
-	)
36
-	{
37
-		$this->twig = $twig;
38
-		$this->UserRepository = $UserRepository;
39
-		$this->debugbar = $debugbar;
40
-
41
-		$logger->addDebug('start work', [1, 2, 'test']);
42
-	}
43
-
44
-	/**
45
-	 * Return index page (/)
46
-	 *
47
-	 * @param array $args
48
-	 * @return Response
49
-	 */
50
-	public function get($args)
51
-	{
52
-		$debugbarRenderer = $this->debugbar->getJavascriptRenderer("/assets/debug_bar");
53
-
54
-		$Users = $this->UserRepository->findMany();
55
-
56
-		$table = \Donquixote\Cellbrush\Table\Table::create();
57
-		$table->addColNames([0, 1, 2]);
58
-		$table->addClass('table table-striped');
59
-		$table->thead()
60
-				->addRowName('head row')
61
-				->th('head row', 0, 'Id')
62
-				->th('head row', 1, 'Имя')
63
-				->th('head row', 2, 'Email');
64
-		$i = 0;
65
-		foreach ($Users as $User) {
66
-			$table->addRow($i)->tdMultiple([
67
-				$User->getId(),
68
-				$User->getName(),
69
-				$User->getEmail()]);
70
-			$i++;
71
-		}
72
-
73
-		return new Response($this->twig->render('pages/index.html.twig', [
74
-					"table"			 => $table->render(),
75
-					"debugbar_Head"	 => $debugbarRenderer->renderHead(),
76
-					"debugbar_Body"	 => $debugbarRenderer->render()
77
-		]));
78
-	}
79
-
80
-	public function add($args)
81
-	{
82
-
83
-
84
-		try {
85
-
86
-
87
-
88
-
89
-			return new Response("success create!");
15
+    /**
16
+     * @var Twig_Environment
17
+     */
18
+    private $twig;
19
+
20
+    /**
21
+     *
22
+     * @var \Models\User\UserRepository $UserRepository
23
+     */
24
+    protected $UserRepository;
25
+
26
+    protected $debugbar;
27
+
28
+    /**
29
+     * IndexController, constructed by container
30
+     *
31
+     * @param Twig_Environment $twig
32
+     */
33
+    public function __construct(
34
+    Twig_Environment $twig, UserRepository $UserRepository, StandardDebugBar $debugbar, Logger $logger
35
+    )
36
+    {
37
+        $this->twig = $twig;
38
+        $this->UserRepository = $UserRepository;
39
+        $this->debugbar = $debugbar;
40
+
41
+        $logger->addDebug('start work', [1, 2, 'test']);
42
+    }
43
+
44
+    /**
45
+     * Return index page (/)
46
+     *
47
+     * @param array $args
48
+     * @return Response
49
+     */
50
+    public function get($args)
51
+    {
52
+        $debugbarRenderer = $this->debugbar->getJavascriptRenderer("/assets/debug_bar");
53
+
54
+        $Users = $this->UserRepository->findMany();
55
+
56
+        $table = \Donquixote\Cellbrush\Table\Table::create();
57
+        $table->addColNames([0, 1, 2]);
58
+        $table->addClass('table table-striped');
59
+        $table->thead()
60
+                ->addRowName('head row')
61
+                ->th('head row', 0, 'Id')
62
+                ->th('head row', 1, 'Имя')
63
+                ->th('head row', 2, 'Email');
64
+        $i = 0;
65
+        foreach ($Users as $User) {
66
+            $table->addRow($i)->tdMultiple([
67
+                $User->getId(),
68
+                $User->getName(),
69
+                $User->getEmail()]);
70
+            $i++;
71
+        }
72
+
73
+        return new Response($this->twig->render('pages/index.html.twig', [
74
+                    "table"			 => $table->render(),
75
+                    "debugbar_Head"	 => $debugbarRenderer->renderHead(),
76
+                    "debugbar_Body"	 => $debugbarRenderer->render()
77
+        ]));
78
+    }
79
+
80
+    public function add($args)
81
+    {
82
+
83
+
84
+        try {
85
+
86
+
87
+
88
+
89
+            return new Response("success create!");
90 90
 			
91
-		} catch(\Exception $ex) {
92
-			return new Response("system error:" . $ex->getMessage());
93
-		}
94
-	}
91
+        } catch(\Exception $ex) {
92
+            return new Response("system error:" . $ex->getMessage());
93
+        }
94
+    }
95 95
 }
Please login to merge, or discard this patch.
app/SeedInterface.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  */
10 10
 interface SeedInterface
11 11
 {
12
-	static public function build($id = 1);
12
+    static public function build($id = 1);
13 13
 	
14
-	static public function reset();
14
+    static public function reset();
15 15
 }
Please login to merge, or discard this patch.