Test Failed
Push — develop ( bd77d0...12e168 )
by nguereza
03:10
created
src/Demo/Response/RedirectResponse.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,15 +15,13 @@
 block discarded – undo
15 15
  *
16 16
  * @author tony
17 17
  */
18
-class RedirectResponse extends Response
19
-{
18
+class RedirectResponse extends Response {
20 19
 
21 20
     /**
22 21
      * Create new instance
23 22
      * @param string $url
24 23
      */
25
-    public function __construct(string $url = '/')
26
-    {
24
+    public function __construct(string $url = '/') {
27 25
         parent::__construct(302);
28 26
         $this->headers['Location'] = [$url];
29 27
     }
Please login to merge, or discard this patch.
src/Demo/Provider/UserServiceProvider.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
  * class UserServiceProvider
62 62
  * @package Platine\Framework
63 63
  */
64
-class UserServiceProvider extends ServiceProvider
65
-{
64
+class UserServiceProvider extends ServiceProvider {
66 65
 
67 66
     /**
68 67
      * {@inheritdoc}
Please login to merge, or discard this patch.
src/Config/DbConfig.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * class DbConfig
55 55
  * @package Platine\Framework\Config
56 56
  */
57
-class DbConfig extends Config
58
-{
57
+class DbConfig extends Config {
59 58
 
60 59
     /**
61 60
      * The Query Builder instance
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * @param QueryBuilder $queryBuilder
69 68
      * @param string $env
70 69
      */
71
-    public function __construct(QueryBuilder $queryBuilder, string $env = '')
72
-    {
70
+    public function __construct(QueryBuilder $queryBuilder, string $env = '') {
73 71
         $this->queryBuilder = $queryBuilder;
74 72
         parent::__construct(new DatabaseConfigLoader($queryBuilder, 'config'), $env);
75 73
     }
Please login to merge, or discard this patch.
src/Config/DatabaseConfigLoader.php 3 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
         $environments = $this->parse($environment);
93 93
         foreach ($environments as $env) {
94 94
             $results = $this->queryBuilder
95
-                          ->from($this->table)
96
-                          ->where('env')->is($env)
97
-                          ->where('module')->is($group)
98
-                          ->where('status')->is(1)
99
-                          ->select()
100
-                          ->fetchObject()
101
-                          ->all();
95
+                            ->from($this->table)
96
+                            ->where('env')->is($env)
97
+                            ->where('module')->is($group)
98
+                            ->where('status')->is(1)
99
+                            ->select()
100
+                            ->fetchObject()
101
+                            ->all();
102 102
 
103 103
             if ($results) {
104 104
                 $config = [];
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
         foreach ($results as $cfg) {
154 154
             if ($cfg->parent) {
155 155
                 $results = $this->queryBuilder
156
-                              ->from($this->table)
157
-                              ->where('env')->is($cfg->env)
158
-                              ->where('module')->is($cfg->parent)
159
-                              ->where('status')->is(1)
160
-                              ->select()
161
-                              ->fetchObject()
162
-                              ->all();
156
+                                ->from($this->table)
157
+                                ->where('env')->is($cfg->env)
158
+                                ->where('module')->is($cfg->parent)
159
+                                ->where('status')->is(1)
160
+                                ->select()
161
+                                ->fetchObject()
162
+                                ->all();
163 163
 
164 164
                 foreach ($results as $cfg) {
165 165
                     $config[$cfg->name] = $cfg->value ?? $cfg->default_value;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
      */
123 123
     protected function parse(string $env): array
124 124
     {
125
-        $environments = array_filter((array)preg_split('/(\/|\.)/', $env));
125
+        $environments = array_filter((array) preg_split('/(\/|\.)/', $env));
126 126
         array_unshift($environments, '');
127 127
 
128 128
         return $environments;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
  * class DatabaseConfigLoader
55 55
  * @package Platine\Framework\Config
56 56
  */
57
-class DatabaseConfigLoader implements LoaderInterface
58
-{
57
+class DatabaseConfigLoader implements LoaderInterface {
59 58
 
60 59
     /**
61 60
      * The QueryBuilder instance
Please login to merge, or discard this patch.
storage/migrations/20210708_043103_add_config_table.php 3 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -9,44 +9,44 @@
 block discarded – undo
9 9
 
10 10
     public function up(): void
11 11
     {
12
-      //Action when migrate up
13
-      $this->create('config', function (CreateTable $table) {
14
-          $table->integer('id')
15
-                  ->autoincrement()
16
-                 ->primary();
17
-          $table->string('env')
18
-                 ->description('The config environment')
19
-                 ->index();
20
-          $table->string('module')
21
-                 ->description('The module')
22
-                 ->index();
23
-          $table->string('code')
24
-                 ->description('The config code')
25
-                  ->notNull()
26
-                  ->index();
27
-          $table->string('value')
28
-                 ->description('The config value');
29
-          $table->string('type')
30
-                 ->description('The config data type');
31
-          $table->text('comment')
32
-                 ->description('The config description');
33
-          $table->integer('status')
34
-                 ->description('The config status')
35
-                 ->defaultValue(0)
36
-                 ->notNull();
37
-          $table->datetime('created_at')
38
-                  ->description('role created at')
39
-                  ->notNull();
40
-          $table->datetime('updated_at')
41
-                  ->description('role updated at');
12
+        //Action when migrate up
13
+        $this->create('config', function (CreateTable $table) {
14
+            $table->integer('id')
15
+                    ->autoincrement()
16
+                    ->primary();
17
+            $table->string('env')
18
+                    ->description('The config environment')
19
+                    ->index();
20
+            $table->string('module')
21
+                    ->description('The module')
22
+                    ->index();
23
+            $table->string('code')
24
+                    ->description('The config code')
25
+                    ->notNull()
26
+                    ->index();
27
+            $table->string('value')
28
+                    ->description('The config value');
29
+            $table->string('type')
30
+                    ->description('The config data type');
31
+            $table->text('comment')
32
+                    ->description('The config description');
33
+            $table->integer('status')
34
+                    ->description('The config status')
35
+                    ->defaultValue(0)
36
+                    ->notNull();
37
+            $table->datetime('created_at')
38
+                    ->description('role created at')
39
+                    ->notNull();
40
+            $table->datetime('updated_at')
41
+                    ->description('role updated at');
42 42
 
43
-          $table->engine('INNODB');
44
-      });
43
+            $table->engine('INNODB');
44
+        });
45 45
     }
46 46
 
47 47
     public function down(): void
48 48
     {
49
-      //Action when migrate down
50
-      $this->drop('config');
49
+        //Action when migrate down
50
+        $this->drop('config');
51 51
     }
52 52
 }
53 53
\ 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
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     public function up(): void
11 11
     {
12 12
       //Action when migrate up
13
-      $this->create('config', function (CreateTable $table) {
13
+      $this->create('config', function(CreateTable $table) {
14 14
           $table->integer('id')
15 15
                   ->autoincrement()
16 16
                  ->primary();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 use Platine\Database\Schema\CreateTable;
5 5
 use Platine\Framework\Migration\AbstractMigration;
6 6
 
7
-class AddConfigTable20210708043103 extends AbstractMigration
8
-{
7
+class AddConfigTable20210708043103 extends AbstractMigration {
9 8
 
10 9
     public function up(): void
11 10
     {
Please login to merge, or discard this patch.