Passed
Push — develop ( 629c3a...e7c784 )
by nguereza
03:51
created
src/Service/Provider/ErrorHandlerServiceProvider.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@
 block discarded – undo
67 67
      */
68 68
     public function register(): void
69 69
     {
70
-        $this->app->bind(ErrorHandlerInterface::class, function (ContainerInterface $app) {
70
+        $this->app->bind(ErrorHandlerInterface::class, function(ContainerInterface $app) {
71 71
             return new ErrorHandler($app->get(LoggerInterface::class));
72 72
         });
73 73
 
74
-        $this->app->bind(ErrorHandlerMiddleware::class, function (ContainerInterface $app) {
74
+        $this->app->bind(ErrorHandlerMiddleware::class, function(ContainerInterface $app) {
75 75
             return new ErrorHandlerMiddleware(
76 76
                 $app->get(Config::class)->get('app.debug', false),
77 77
                 $app->get(LoggerInterface::class)
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
  * @class ErrorHandlerServiceProvider
60 60
  * @package Platine\Framework\Service\Provider
61 61
  */
62
-class ErrorHandlerServiceProvider extends ServiceProvider
63
-{
62
+class ErrorHandlerServiceProvider extends ServiceProvider {
64 63
     /**
65 64
      * {@inheritdoc}
66 65
      */
Please login to merge, or discard this patch.
src/Env/Loader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
                 continue;
169 169
             }
170 170
 
171
-            $value = preg_replace_callback('~\$\{(\w+)\}~', function ($m) {
171
+            $value = preg_replace_callback('~\$\{(\w+)\}~', function($m) {
172 172
                 return (null === $ref = Env::get($m[1], null)) ? $m[0] : $ref;
173 173
             }, $value);
174 174
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * @class Loader
56 56
  * @package Platine\Framework\Env
57 57
  */
58
-class Loader
59
-{
58
+class Loader {
60 59
     /**
61 60
      * Put the parsed key value pair into
62 61
      * $_ENV super global.
Please login to merge, or discard this patch.
src/Env/Env.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -116,12 +116,12 @@
 block discarded – undo
116 116
         $options = 0
117 117
     ) {
118 118
         static $special = [
119
-          'true' => true,
120
-          'TRUE' => true,
121
-          'false' => false,
122
-          'FALSE' => false,
123
-          'null' => null,
124
-          'NULL' => null,
119
+            'true' => true,
120
+            'TRUE' => true,
121
+            'false' => false,
122
+            'FALSE' => false,
123
+            'null' => null,
124
+            'NULL' => null,
125 125
         ];
126 126
 
127 127
         $valueResolved = static::resolveReference($value);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
             return $value;
150 150
         }
151 151
 
152
-        $valueResolved = preg_replace_callback('~\$\{(\w+)\}~', function ($m) {
152
+        $valueResolved = preg_replace_callback('~\$\{(\w+)\}~', function($m) {
153 153
             return (null === $ref = static::get($m[1], null)) ? $m[0] : $ref;
154 154
         }, $value);
155 155
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class Env
53 53
  * @package Platine\Framework\Env
54 54
  */
55
-class Env
56
-{
55
+class Env {
57 56
     /**
58 57
      * Get the environment variable by its key/name.
59 58
      * @param string $key
Please login to merge, or discard this patch.
src/Migration/Seed/AbstractSeed.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class AbstractSeed
54 54
  * @package Platine\Framework\Migration\Seed
55 55
  */
56
-abstract class AbstractSeed extends QueryBuilder
57
-{
56
+abstract class AbstractSeed extends QueryBuilder {
58 57
     /**
59 58
      * Run the seed
60 59
      * @return void
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
      * Create new instance
64 63
      * {@inheritdoc}
@@ -76,8 +75,7 @@  discard block
 block discarded – undo
76 75
     /**
77 76
      * {@inheritdoc}
78 77
      */
79
-    public function execute()
80
-    {
78
+    public function execute() {
81 79
         $writer = $this->io()->writer();
82 80
         $writer->boldYellow('SEED STATUS', true)->eol();
83 81
         $writer->bold('Seed path: ');
Please login to merge, or discard this patch.
src/Migration/Seed/Command/SeedExecuteCommand.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: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.
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 SeedExecuteCommand extends AbstractSeedCommand
61
-{
60
+class SeedExecuteCommand extends AbstractSeedCommand {
62 61
     /**
63 62
      * Create new instance
64 63
      * {@inheritdoc}
@@ -76,8 +75,7 @@  discard block
 block discarded – undo
76 75
     /**
77 76
      * {@inheritdoc}
78 77
      */
79
-    public function execute()
80
-    {
78
+    public function execute() {
81 79
         $io = $this->io();
82 80
         $writer = $io->writer();
83 81
         $writer->boldYellow('SEED EXECUTION', true)->eol();
Please login to merge, or discard this patch.
src/Migration/Seed/Command/SeedCreateCommand.php 5 patches
Indentation   +1 added lines, -20 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,22 +157,3 @@  discard block
 block discarded – undo
157 157
     private function getTemplateClass(): string
158 158
     {
159 159
         return <<<EOF
160
-        <?php
161
-        declare(strict_types=1);
162
-        
163
-        namespace Platine\Framework\Migration\Seed;
164
-
165
-        use Platine\Framework\Migration\Seed\AbstractSeed;
166
-
167
-        class %classname% extends AbstractSeed
168
-        {
169
-
170
-            public function run(): void
171
-            {
172
-              //Action when run the seed
173
-
174
-            }
175
-        }
176
-        EOF;
177
-    }
178
-}
Please login to merge, or discard this patch.
Switch Indentation   -19 removed lines patch added patch discarded remove patch
@@ -157,22 +157,3 @@
 block discarded – undo
157 157
     private function getTemplateClass(): string
158 158
     {
159 159
         return <<<EOF
160
-        <?php
161
-        declare(strict_types=1);
162
-        
163
-        namespace Platine\Framework\Migration\Seed;
164
-
165
-        use Platine\Framework\Migration\Seed\AbstractSeed;
166
-
167
-        class %classname% extends AbstractSeed
168
-        {
169
-
170
-            public function run(): void
171
-            {
172
-              //Action when run the seed
173
-
174
-            }
175
-        }
176
-        EOF;
177
-    }
178
-}
Please login to merge, or discard this patch.
Spacing   -19 removed lines patch added patch discarded remove patch
@@ -157,22 +157,3 @@
 block discarded – undo
157 157
     private function getTemplateClass(): string
158 158
     {
159 159
         return <<<EOF
160
-        <?php
161
-        declare(strict_types=1);
162
-        
163
-        namespace Platine\Framework\Migration\Seed;
164
-
165
-        use Platine\Framework\Migration\Seed\AbstractSeed;
166
-
167
-        class %classname% extends AbstractSeed
168
-        {
169
-
170
-            public function run(): void
171
-            {
172
-              //Action when run the seed
173
-
174
-            }
175
-        }
176
-        EOF;
177
-    }
178
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -19 removed lines patch added patch discarded remove patch
@@ -157,22 +157,3 @@
 block discarded – undo
157 157
     private function getTemplateClass(): string
158 158
     {
159 159
         return <<<EOF
160
-        <?php
161
-        declare(strict_types=1);
162
-        
163
-        namespace Platine\Framework\Migration\Seed;
164
-
165
-        use Platine\Framework\Migration\Seed\AbstractSeed;
166
-
167
-        class %classname% extends AbstractSeed
168
-        {
169
-
170
-            public function run(): void
171
-            {
172
-              //Action when run the seed
173
-
174
-            }
175
-        }
176
-        EOF;
177
-    }
178
-}
Please login to merge, or discard this patch.
Braces   +2 added lines, -23 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
      * The seed name
68 67
      * @var string
@@ -88,8 +87,7 @@  discard block
 block discarded – undo
88 87
     /**
89 88
      * {@inheritdoc}
90 89
      */
91
-    public function execute()
92
-    {
90
+    public function execute() {
93 91
         $writer = $this->io()->writer();
94 92
 
95 93
         $className = $this->getSeedClassName($this->name);
@@ -156,22 +154,3 @@  discard block
 block discarded – undo
156 154
     private function getTemplateClass(): string
157 155
     {
158 156
         return <<<EOF
159
-        <?php
160
-        declare(strict_types=1);
161
-        
162
-        namespace Platine\Framework\Migration\Seed;
163
-
164
-        use Platine\Framework\Migration\Seed\AbstractSeed;
165
-
166
-        class %classname% extends AbstractSeed
167
-        {
168
-
169
-            public function run(): void
170
-            {
171
-              //Action when run the seed
172
-
173
-            }
174
-        }
175
-        EOF;
176
-    }
177
-}
Please login to merge, or discard this patch.
src/Migration/Command/MigrationCreateCommand.php 5 patches
Indentation   +1 added lines, -26 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     ) {
83 83
         parent::__construct($app, $repository, $config, $filesystem);
84 84
         $this->setName('migration:create')
85
-             ->setDescription('Create a new migration');
85
+                ->setDescription('Create a new migration');
86 86
 
87 87
         $this->addArgument('name', 'name of migration', null, false, true);
88 88
     }
@@ -161,28 +161,3 @@  discard block
 block discarded – undo
161 161
     private function getTemplateClass(): string
162 162
     {
163 163
         return <<<EOF
164
-        <?php
165
-        declare(strict_types=1);
166
-        
167
-        namespace Platine\Framework\Migration;
168
-
169
-        use Platine\Framework\Migration\AbstractMigration;
170
-
171
-        class %classname% extends AbstractMigration
172
-        {
173
-
174
-            public function up(): void
175
-            {
176
-              //Action when migrate up
177
-
178
-            }
179
-
180
-            public function down(): void
181
-            {
182
-              //Action when migrate down
183
-
184
-            }
185
-        }
186
-        EOF;
187
-    }
188
-}
Please login to merge, or discard this patch.
Switch Indentation   -25 removed lines patch added patch discarded remove patch
@@ -161,28 +161,3 @@
 block discarded – undo
161 161
     private function getTemplateClass(): string
162 162
     {
163 163
         return <<<EOF
164
-        <?php
165
-        declare(strict_types=1);
166
-        
167
-        namespace Platine\Framework\Migration;
168
-
169
-        use Platine\Framework\Migration\AbstractMigration;
170
-
171
-        class %classname% extends AbstractMigration
172
-        {
173
-
174
-            public function up(): void
175
-            {
176
-              //Action when migrate up
177
-
178
-            }
179
-
180
-            public function down(): void
181
-            {
182
-              //Action when migrate down
183
-
184
-            }
185
-        }
186
-        EOF;
187
-    }
188
-}
Please login to merge, or discard this patch.
Spacing   -25 removed lines patch added patch discarded remove patch
@@ -161,28 +161,3 @@
 block discarded – undo
161 161
     private function getTemplateClass(): string
162 162
     {
163 163
         return <<<EOF
164
-        <?php
165
-        declare(strict_types=1);
166
-        
167
-        namespace Platine\Framework\Migration;
168
-
169
-        use Platine\Framework\Migration\AbstractMigration;
170
-
171
-        class %classname% extends AbstractMigration
172
-        {
173
-
174
-            public function up(): void
175
-            {
176
-              //Action when migrate up
177
-
178
-            }
179
-
180
-            public function down(): void
181
-            {
182
-              //Action when migrate down
183
-
184
-            }
185
-        }
186
-        EOF;
187
-    }
188
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -25 removed lines patch added patch discarded remove patch
@@ -161,28 +161,3 @@
 block discarded – undo
161 161
     private function getTemplateClass(): string
162 162
     {
163 163
         return <<<EOF
164
-        <?php
165
-        declare(strict_types=1);
166
-        
167
-        namespace Platine\Framework\Migration;
168
-
169
-        use Platine\Framework\Migration\AbstractMigration;
170
-
171
-        class %classname% extends AbstractMigration
172
-        {
173
-
174
-            public function up(): void
175
-            {
176
-              //Action when migrate up
177
-
178
-            }
179
-
180
-            public function down(): void
181
-            {
182
-              //Action when migrate down
183
-
184
-            }
185
-        }
186
-        EOF;
187
-    }
188
-}
Please login to merge, or discard this patch.
Braces   +2 added lines, -29 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * @template T
62 62
  * @extends AbstractCommand<T>
63 63
  */
64
-class MigrationCreateCommand extends AbstractCommand
65
-{
64
+class MigrationCreateCommand extends AbstractCommand {
66 65
     /**
67 66
      * The migration name
68 67
      * @var string
@@ -89,8 +88,7 @@  discard block
 block discarded – undo
89 88
     /**
90 89
      * {@inheritdoc}
91 90
      */
92
-    public function execute()
93
-    {
91
+    public function execute() {
94 92
         $writer = $this->io()->writer();
95 93
 
96 94
         $version = date('Ymd_His');
@@ -160,28 +158,3 @@  discard block
 block discarded – undo
160 158
     private function getTemplateClass(): string
161 159
     {
162 160
         return <<<EOF
163
-        <?php
164
-        declare(strict_types=1);
165
-        
166
-        namespace Platine\Framework\Migration;
167
-
168
-        use Platine\Framework\Migration\AbstractMigration;
169
-
170
-        class %classname% extends AbstractMigration
171
-        {
172
-
173
-            public function up(): void
174
-            {
175
-              //Action when migrate up
176
-
177
-            }
178
-
179
-            public function down(): void
180
-            {
181
-              //Action when migrate down
182
-
183
-            }
184
-        }
185
-        EOF;
186
-    }
187
-}
Please login to merge, or discard this patch.
src/Migration/Seed/Command/SeedCreateDbCommand.php 5 patches
Indentation   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $this->queryBuilder = $queryBuilder;
107 107
 
108 108
         $this->setName('seed:createdb')
109
-             ->setDescription('Create a new seed using existing data');
109
+                ->setDescription('Create a new seed using existing data');
110 110
 
111 111
         $this->addArgument('table', 'name of the table', null, true, false);
112 112
         $this->addArgument('name', 'name of seed', null, false, true);
@@ -257,6 +257,4 @@  discard block
 block discarded – undo
257 257
         );
258 258
         $export = join(PHP_EOL, array_filter(['['] + $array));
259 259
         
260
-        return $export;
261
-    }
262
-}
260
+        return $export
263 261
\ No newline at end of file
Please login to merge, or discard this patch.
Switch Indentation   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -257,6 +257,4 @@
 block discarded – undo
257 257
         );
258 258
         $export = join(PHP_EOL, array_filter(['['] + $array));
259 259
         
260
-        return $export;
261
-    }
262
-}
260
+        return $export
263 261
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -257,6 +257,4 @@
 block discarded – undo
257 257
         );
258 258
         $export = join(PHP_EOL, array_filter(['['] + $array));
259 259
         
260
-        return $export;
261
-    }
262
-}
260
+        return $export
263 261
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -257,6 +257,4 @@
 block discarded – undo
257 257
         );
258 258
         $export = join(PHP_EOL, array_filter(['['] + $array));
259 259
         
260
-        return $export;
261
-    }
262
-}
260
+        return $export
263 261
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
  * @template T
64 64
  * @extends AbstractSeedCommand<T>
65 65
  */
66
-class SeedCreateDbCommand extends AbstractSeedCommand
67
-{
66
+class SeedCreateDbCommand extends AbstractSeedCommand {
68 67
     /**
69 68
      * The seed name
70 69
      * @var string
@@ -114,8 +113,7 @@  discard block
 block discarded – undo
114 113
     /**
115 114
      * {@inheritdoc}
116 115
      */
117
-    public function execute()
118
-    {
116
+    public function execute() {
119 117
         $writer = $this->io()->writer();
120 118
 
121 119
         $this->table = $this->getArgumentValue('table');
@@ -256,6 +254,4 @@  discard block
 block discarded – undo
256 254
         );
257 255
         $export = join(PHP_EOL, array_filter(['['] + $array));
258 256
 
259
-        return $export;
260
-    }
261
-}
257
+        return $export
262 258
\ No newline at end of file
Please login to merge, or discard this patch.