Passed
Push — develop ( 547db1...d4a213 )
by nguereza
02:48
created
src/Migration/Seed/Command/AbstractSeedCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@
 block discarded – undo
64 64
  * @package Platine\Framework\Migration\Seed\Command
65 65
  * @template T
66 66
  */
67
-abstract class AbstractSeedCommand extends Command
68
-{
67
+abstract class AbstractSeedCommand extends Command {
69 68
 
70 69
     /**
71 70
      * The configuration to use
Please login to merge, or discard this patch.
src/Migration/Seed/Command/SeedCreateCommand.php 5 patches
Indentation   +1 added lines, -18 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     ) {
82 82
         parent::__construct($app, $config, $filesystem);
83 83
         $this->setName('seed:create')
84
-             ->setDescription('Create a new seed');
84
+                ->setDescription('Create a new seed');
85 85
 
86 86
         $this->addArgument('name', 'name of seed', null, false, true);
87 87
     }
@@ -157,20 +157,3 @@  discard block
 block discarded – undo
157 157
     private function getTemplateClass(): string
158 158
     {
159 159
         return <<<EOF
160
-        <?php
161
-        namespace Platine\Framework\Migration\Seed;
162
-
163
-        use Platine\Framework\Migration\Seed\AbstractSeed;
164
-
165
-        class %classname% extends AbstractSeed
166
-        {
167
-
168
-            public function run(): void
169
-            {
170
-              //Action when run the seed
171
-
172
-            }
173
-        }
174
-        EOF;
175
-    }
176
-}
Please login to merge, or discard this patch.
Switch Indentation   -17 removed lines patch added patch discarded remove patch
@@ -157,20 +157,3 @@
 block discarded – undo
157 157
     private function getTemplateClass(): string
158 158
     {
159 159
         return <<<EOF
160
-        <?php
161
-        namespace Platine\Framework\Migration\Seed;
162
-
163
-        use Platine\Framework\Migration\Seed\AbstractSeed;
164
-
165
-        class %classname% extends AbstractSeed
166
-        {
167
-
168
-            public function run(): void
169
-            {
170
-              //Action when run the seed
171
-
172
-            }
173
-        }
174
-        EOF;
175
-    }
176
-}
Please login to merge, or discard this patch.
Spacing   -17 removed lines patch added patch discarded remove patch
@@ -157,20 +157,3 @@
 block discarded – undo
157 157
     private function getTemplateClass(): string
158 158
     {
159 159
         return <<<EOF
160
-        <?php
161
-        namespace Platine\Framework\Migration\Seed;
162
-
163
-        use Platine\Framework\Migration\Seed\AbstractSeed;
164
-
165
-        class %classname% extends AbstractSeed
166
-        {
167
-
168
-            public function run(): void
169
-            {
170
-              //Action when run the seed
171
-
172
-            }
173
-        }
174
-        EOF;
175
-    }
176
-}
Please login to merge, or discard this patch.
Braces   +2 added lines, -21 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * @template T
62 62
  * @extends AbstractSeedCommand<T>
63 63
  */
64
-class SeedCreateCommand extends AbstractSeedCommand
65
-{
64
+class SeedCreateCommand extends AbstractSeedCommand {
66 65
 
67 66
     /**
68 67
      * The seed name
@@ -89,8 +88,7 @@  discard block
 block discarded – undo
89 88
     /**
90 89
      * {@inheritodc}
91 90
      */
92
-    public function execute()
93
-    {
91
+    public function execute() {
94 92
         $writer = $this->io()->writer();
95 93
 
96 94
         $className = $this->getSeedClassName($this->name);
@@ -157,20 +155,3 @@  discard block
 block discarded – undo
157 155
     private function getTemplateClass(): string
158 156
     {
159 157
         return <<<EOF
160
-        <?php
161
-        namespace Platine\Framework\Migration\Seed;
162
-
163
-        use Platine\Framework\Migration\Seed\AbstractSeed;
164
-
165
-        class %classname% extends AbstractSeed
166
-        {
167
-
168
-            public function run(): void
169
-            {
170
-              //Action when run the seed
171
-
172
-            }
173
-        }
174
-        EOF;
175
-    }
176
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -17 removed lines patch added patch discarded remove patch
@@ -157,20 +157,3 @@
 block discarded – undo
157 157
     private function getTemplateClass(): string
158 158
     {
159 159
         return <<<EOF
160
-        <?php
161
-        namespace Platine\Framework\Migration\Seed;
162
-
163
-        use Platine\Framework\Migration\Seed\AbstractSeed;
164
-
165
-        class %classname% extends AbstractSeed
166
-        {
167
-
168
-            public function run(): void
169
-            {
170
-              //Action when run the seed
171
-
172
-            }
173
-        }
174
-        EOF;
175
-    }
176
-}
Please login to merge, or discard this patch.
src/Migration/Seed/Command/SeedStatusCommand.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     ) {
72 72
         parent::__construct($app, $config, $filesystem);
73 73
         $this->setName('seed:status')
74
-             ->setDescription('Show your database seeds status');
74
+                ->setDescription('Show your database seeds status');
75 75
     }
76 76
 
77 77
     /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * @template T
58 58
  * @extends AbstractSeedCommand<T>
59 59
  */
60
-class SeedStatusCommand extends AbstractSeedCommand
61
-{
60
+class SeedStatusCommand extends AbstractSeedCommand {
62 61
 
63 62
     /**
64 63
      * Create new instance
@@ -77,8 +76,7 @@  discard block
 block discarded – undo
77 76
     /**
78 77
      * {@inheritodc}
79 78
      */
80
-    public function execute()
81
-    {
79
+    public function execute() {
82 80
         $writer = $this->io()->writer();
83 81
         $writer->boldYellow('SEED STATUS', true)->eol();
84 82
         $writer->bold('Seed path: ');
Please login to merge, or discard this patch.
src/Migration/Seed/Command/SeedExecuteCommand.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     ) {
72 72
         parent::__construct($app, $config, $filesystem);
73 73
         $this->setName('seed:exec')
74
-             ->setDescription('Command to execute seed');
74
+                ->setDescription('Command to execute seed');
75 75
     }
76 76
 
77 77
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
                 $choices[$key + 1] = $seed;
94 94
             }
95 95
             $indexes = $io->choices('Choose which seed to execute', $choices, []);
96
-            foreach ($indexes as $index){
96
+            foreach ($indexes as $index) {
97 97
                 $this->executeSeed($seeds[$index - 1]);
98 98
             }
99 99
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * @template T
58 58
  * @extends AbstractSeedCommand<T>
59 59
  */
60
-class SeedExecuteCommand extends AbstractSeedCommand
61
-{
60
+class SeedExecuteCommand extends AbstractSeedCommand {
62 61
 
63 62
     /**
64 63
      * Create new instance
@@ -77,8 +76,7 @@  discard block
 block discarded – undo
77 76
     /**
78 77
      * {@inheritodc}
79 78
      */
80
-    public function execute()
81
-    {
79
+    public function execute() {
82 80
         $io = $this->io();
83 81
         $writer = $io->writer();
84 82
         $writer->boldYellow('SEED EXECUTION', true)->eol();
@@ -93,7 +91,7 @@  discard block
 block discarded – undo
93 91
                 $choices[$key + 1] = $seed;
94 92
             }
95 93
             $indexes = $io->choices('Choose which seed to execute', $choices, []);
96
-            foreach ($indexes as $index){
94
+            foreach ($indexes as $index) {
97 95
                 $this->executeSeed($seeds[$index - 1]);
98 96
             }
99 97
         }
Please login to merge, or discard this patch.