Passed
Push — master ( 86cfdb...e29dd4 )
by nguereza
03:59 queued 01:47
created
config/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 use Platine\App\Http\Action\HomeAction;
4 4
 use Platine\Route\Router;
5 5
 
6
-return [static function (Router $router): void {
6
+return [static function(Router $router): void {
7 7
     $router->get('/', HomeAction::class, 'home');
8 8
 }];
Please login to merge, or discard this patch.
public/index.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,11 +63,11 @@
 block discarded – undo
63 63
 
64 64
 $app = new Application();
65 65
 $app->setConfigPath(CONFIG_PATH)
66
-      ->setRootPath(ROOT_PATH)
67
-      ->setAppPath(APP_PATH)
68
-      ->setVendorPath(VENDOR_PATH)
69
-      ->setStoragePath(STORAGE_PATH)
70
-      ->setEnvironment(ENVIRONMENT);
66
+        ->setRootPath(ROOT_PATH)
67
+        ->setAppPath(APP_PATH)
68
+        ->setVendorPath(VENDOR_PATH)
69
+        ->setStoragePath(STORAGE_PATH)
70
+        ->setEnvironment(ENVIRONMENT);
71 71
 
72 72
 /** @var HttpKernel $kernel */
73 73
 $kernel = $app->make(HttpKernel::class);
Please login to merge, or discard this patch.
storage/migrations/20210705_065247_add_roles_table.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public function up(): void
11 11
     {
12
-      //Action when migrate up
12
+        //Action when migrate up
13 13
         $this->create('roles', function (CreateTable $table) {
14 14
             $table->integer('id')
15
-                  ->autoincrement()
16
-                 ->primary();
15
+                    ->autoincrement()
16
+                    ->primary();
17 17
             $table->string('name')
18
-                 ->description('The role name')
19
-                 ->notNull();
18
+                    ->description('The role name')
19
+                    ->notNull();
20 20
             $table->string('description')
21
-                 ->description('The role description');
21
+                    ->description('The role description');
22 22
             $table->datetime('created_at')
23
-                  ->description('role created at')
24
-                  ->notNull();
23
+                    ->description('role created at')
24
+                    ->notNull();
25 25
             $table->datetime('updated_at')
26
-                  ->description('role updated at');
26
+                    ->description('role updated at');
27 27
 
28 28
             $table->engine('INNODB');
29 29
         });
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function down(): void
33 33
     {
34
-      //Action when migrate down
34
+        //Action when migrate down
35 35
         $this->drop('roles');
36 36
     }
37 37
 }
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('roles', function (CreateTable $table) {
13
+        $this->create('roles', function(CreateTable $table) {
14 14
             $table->integer('id')
15 15
                   ->autoincrement()
16 16
                  ->primary();
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,11 @@
 block discarded – undo
5 5
 use Platine\Database\Schema\CreateTable;
6 6
 use Platine\Framework\Migration\AbstractMigration;
7 7
 
8
-class AddRolesTable20210705065247 extends AbstractMigration
9
-{
8
+class AddRolesTable20210705065247 extends AbstractMigration {
10 9
     public function up(): void
11 10
     {
12 11
       //Action when migrate up
13
-        $this->create('roles', function (CreateTable $table) {
12
+        $this->create('roles', function (CreateTable $table) {
14 13
             $table->integer('id')
15 14
                   ->autoincrement()
16 15
                  ->primary();
Please login to merge, or discard this patch.
storage/migrations/20210705_065248_add_users_table.php 3 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -9,45 +9,45 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public function up(): void
11 11
     {
12
-      //Action when migrate up
12
+        //Action when migrate up
13 13
         $this->create('users', function (CreateTable $table) {
14 14
             $table->integer('id')
15
-                  ->autoincrement()
16
-                 ->primary();
15
+                    ->autoincrement()
16
+                    ->primary();
17 17
 
18 18
             $table->string('username')
19
-                 ->description('The user username')
20
-                 ->unique()
21
-                 ->notNull();
19
+                    ->description('The user username')
20
+                    ->unique()
21
+                    ->notNull();
22 22
 
23 23
             $table->string('email')
24
-                 ->description('The user email')
25
-                 ->unique()
26
-                 ->notNull();
24
+                    ->description('The user email')
25
+                    ->unique()
26
+                    ->notNull();
27 27
 
28 28
             $table->string('password')
29
-                 ->description('The user password')
30
-                 ->notNull();
29
+                    ->description('The user password')
30
+                    ->notNull();
31 31
 
32 32
             $table->fixed('status', 1)
33
-                 ->description('The user status, A=Active, D=Deactive')
34
-                 ->defaultValue('D');
33
+                    ->description('The user status, A=Active, D=Deactive')
34
+                    ->defaultValue('D');
35 35
 
36 36
             $table->string('lastname')
37
-                 ->description('The user lastname');
37
+                    ->description('The user lastname');
38 38
 
39 39
             $table->string('firstname')
40
-                 ->description('The user firstname');
40
+                    ->description('The user firstname');
41 41
 
42 42
             $table->string('role')
43
-                 ->description('The user role or function');
43
+                    ->description('The user role or function');
44 44
 
45 45
             $table->datetime('created_at')
46
-                  ->description('created date')
47
-                  ->notNull();
46
+                    ->description('created date')
47
+                    ->notNull();
48 48
 
49 49
             $table->datetime('updated_at')
50
-                  ->description('last updated date');
50
+                    ->description('last updated date');
51 51
 
52 52
             $table->engine('INNODB');
53 53
         });
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function down(): void
57 57
     {
58
-      //Action when migrate down
58
+        //Action when migrate down
59 59
         $this->drop('users');
60 60
     }
61 61
 }
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('users', function (CreateTable $table) {
13
+        $this->create('users', function(CreateTable $table) {
14 14
             $table->integer('id')
15 15
                   ->autoincrement()
16 16
                  ->primary();
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,11 @@
 block discarded – undo
5 5
 use Platine\Database\Schema\CreateTable;
6 6
 use Platine\Framework\Migration\AbstractMigration;
7 7
 
8
-class AddUsersTable20210705065248 extends AbstractMigration
9
-{
8
+class AddUsersTable20210705065248 extends AbstractMigration {
10 9
     public function up(): void
11 10
     {
12 11
       //Action when migrate up
13
-        $this->create('users', function (CreateTable $table) {
12
+        $this->create('users', function (CreateTable $table) {
14 13
             $table->integer('id')
15 14
                   ->autoincrement()
16 15
                  ->primary();
Please login to merge, or discard this patch.
storage/migrations/20210717_094822_add_permission_roles_table.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public function up(): void
11 11
     {
12
-      //Action when migrate up
12
+        //Action when migrate up
13 13
         $this->create('permissions_roles', function (CreateTable $table) {
14 14
             $table->integer('permission_id');
15 15
             $table->integer('role_id');
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
             $table->primary(['permission_id', 'role_id']);
18 18
 
19 19
             $table->foreign('permission_id')
20
-                 ->references('permissions', 'id')
21
-                 ->onDelete('CASCADE');
20
+                    ->references('permissions', 'id')
21
+                    ->onDelete('CASCADE');
22 22
 
23 23
             $table->foreign('role_id')
24
-                  ->references('roles', 'id')
25
-                  ->onDelete('CASCADE');
24
+                    ->references('roles', 'id')
25
+                    ->onDelete('CASCADE');
26 26
 
27 27
             $table->engine('INNODB');
28 28
         });
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function down(): void
32 32
     {
33
-      //Action when migrate down
33
+        //Action when migrate down
34 34
         $this->drop('permissions_roles');
35 35
     }
36 36
 }
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('permissions_roles', function (CreateTable $table) {
13
+        $this->create('permissions_roles', function(CreateTable $table) {
14 14
             $table->integer('permission_id');
15 15
             $table->integer('role_id');
16 16
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,11 @@
 block discarded – undo
5 5
 use Platine\Database\Schema\CreateTable;
6 6
 use Platine\Framework\Migration\AbstractMigration;
7 7
 
8
-class AddPermissionRolesTable20210717094822 extends AbstractMigration
9
-{
8
+class AddPermissionRolesTable20210717094822 extends AbstractMigration {
10 9
     public function up(): void
11 10
     {
12 11
       //Action when migrate up
13
-        $this->create('permissions_roles', function (CreateTable $table) {
12
+        $this->create('permissions_roles', function (CreateTable $table) {
14 13
             $table->integer('permission_id');
15 14
             $table->integer('role_id');
16 15
 
Please login to merge, or discard this patch.
storage/migrations/20210823_152146_add_api_tokens_table.php 3 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -9,22 +9,22 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public function up(): void
11 11
     {
12
-      //Action when migrate up
12
+        //Action when migrate up
13 13
         $this->create('tokens', function (CreateTable $table) {
14 14
             $table->integer('id')
15
-              ->autoincrement()
16
-             ->primary();
15
+                ->autoincrement()
16
+                ->primary();
17 17
 
18 18
             $table->string('token')
19
-             ->unique()
20
-             ->notNull();
19
+                ->unique()
20
+                ->notNull();
21 21
 
22 22
             $table->string('refresh_token')
23
-             ->unique()
24
-             ->notNull();
23
+                ->unique()
24
+                ->notNull();
25 25
 
26 26
             $table->datetime('expire_at')
27
-             ->notNull();
27
+                ->notNull();
28 28
 
29 29
             $table->integer('user_id')
30 30
                 ->description('The owner of the token')
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
                 ->references('users', 'id')
35 35
                 ->onDelete('NO ACTION');
36 36
             $table->datetime('created_at')
37
-              ->description('created date')
38
-              ->notNull();
37
+                ->description('created date')
38
+                ->notNull();
39 39
 
40 40
             $table->datetime('updated_at')
41
-              ->description('last updated date');
41
+                ->description('last updated date');
42 42
 
43 43
             $table->engine('INNODB');
44 44
         });
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     public function down(): void
48 48
     {
49
-      //Action when migrate down
49
+        //Action when migrate down
50 50
         $this->drop('tokens');
51 51
     }
52 52
 }
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('tokens', function (CreateTable $table) {
13
+        $this->create('tokens', function(CreateTable $table) {
14 14
             $table->integer('id')
15 15
               ->autoincrement()
16 16
              ->primary();
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,11 @@
 block discarded – undo
5 5
 use Platine\Database\Schema\CreateTable;
6 6
 use Platine\Framework\Migration\AbstractMigration;
7 7
 
8
-class AddApiTokensTable20210823152146 extends AbstractMigration
9
-{
8
+class AddApiTokensTable20210823152146 extends AbstractMigration {
10 9
     public function up(): void
11 10
     {
12 11
       //Action when migrate up
13
-        $this->create('tokens', function (CreateTable $table) {
12
+        $this->create('tokens', function (CreateTable $table) {
14 13
             $table->integer('id')
15 14
               ->autoincrement()
16 15
              ->primary();
Please login to merge, or discard this patch.
storage/migrations/20210717_094547_add_permissions_table.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -9,25 +9,25 @@  discard block
 block discarded – undo
9 9
 {
10 10
     public function up(): void
11 11
     {
12
-      //Action when migrate up
12
+        //Action when migrate up
13 13
         $this->create('permissions', function (CreateTable $table) {
14 14
             $table->integer('id')
15
-                  ->autoincrement()
16
-                 ->primary();
15
+                    ->autoincrement()
16
+                    ->primary();
17 17
             $table->string('code')
18
-                 ->description('The permission code')
19
-                 ->unique()
20
-                 ->notNull();
18
+                    ->description('The permission code')
19
+                    ->unique()
20
+                    ->notNull();
21 21
             $table->string('description')
22
-                 ->description('The permission description')
23
-                 ->notNull();
22
+                    ->description('The permission description')
23
+                    ->notNull();
24 24
             $table->string('depend')
25
-                 ->description('The permission dependency');
25
+                    ->description('The permission dependency');
26 26
             $table->datetime('created_at')
27
-                  ->description('permission created at')
28
-                  ->notNull();
27
+                    ->description('permission created at')
28
+                    ->notNull();
29 29
             $table->datetime('updated_at')
30
-                  ->description('permission updated at');
30
+                    ->description('permission updated at');
31 31
 
32 32
             $table->engine('INNODB');
33 33
         });
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function down(): void
37 37
     {
38
-      //Action when migrate down
38
+        //Action when migrate down
39 39
         $this->drop('permissions');
40 40
     }
41 41
 }
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('permissions', function (CreateTable $table) {
13
+        $this->create('permissions', function(CreateTable $table) {
14 14
             $table->integer('id')
15 15
                   ->autoincrement()
16 16
                  ->primary();
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,11 @@
 block discarded – undo
5 5
 use Platine\Database\Schema\CreateTable;
6 6
 use Platine\Framework\Migration\AbstractMigration;
7 7
 
8
-class AddPermissionsTable20210717094547 extends AbstractMigration
9
-{
8
+class AddPermissionsTable20210717094547 extends AbstractMigration {
10 9
     public function up(): void
11 10
     {
12 11
       //Action when migrate up
13
-        $this->create('permissions', function (CreateTable $table) {
12
+        $this->create('permissions', function (CreateTable $table) {
14 13
             $table->integer('id')
15 14
                   ->autoincrement()
16 15
                  ->primary();
Please login to merge, or discard this patch.
storage/migrations/20220109_074106_add_configuration_table.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -11,46 +11,46 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function up(): void
13 13
     {
14
-      //Action when migrate up
14
+        //Action when migrate up
15 15
         $this->create('configurations', function (CreateTable $table) {
16 16
             $table->integer('id')
17
-                  ->autoincrement()
18
-                 ->primary();
17
+                    ->autoincrement()
18
+                    ->primary();
19 19
 
20 20
             $table->string('env')
21
-                 ->description('The config environment')
22
-                 ->index();
21
+                    ->description('The config environment')
22
+                    ->index();
23 23
 
24 24
             $table->string('module')
25
-                 ->description('The module')
26
-                 ->index()
27
-                 ->notNull();
25
+                    ->description('The module')
26
+                    ->index()
27
+                    ->notNull();
28 28
 
29 29
             $table->string('name')
30
-                 ->description('The config name')
31
-                  ->index();
30
+                    ->description('The config name')
31
+                    ->index();
32 32
 
33 33
             $table->text('value')
34
-                 ->description('The config value');
34
+                    ->description('The config value');
35 35
 
36 36
             $table->string('type')
37
-                 ->description('The config data type')
38
-                 ->notNull();
37
+                    ->description('The config data type')
38
+                    ->notNull();
39 39
 
40 40
             $table->text('comment')
41
-                 ->description('The config description');
41
+                    ->description('The config description');
42 42
 
43 43
             $table->fixed('status', 1)
44
-                 ->description('The config status')
45
-                 ->defaultValue('N')
46
-                 ->notNull();
44
+                    ->description('The config status')
45
+                    ->defaultValue('N')
46
+                    ->notNull();
47 47
 
48 48
             $table->datetime('created_at')
49
-                  ->description('created date')
50
-                  ->notNull();
49
+                    ->description('created date')
50
+                    ->notNull();
51 51
 
52 52
             $table->datetime('updated_at')
53
-                  ->description('updated date');
53
+                    ->description('updated date');
54 54
 
55 55
             $table->engine('INNODB');
56 56
         });
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function down(): void
60 60
     {
61
-      //Action when migrate down
61
+        //Action when migrate down
62 62
         $this->drop('configurations');
63 63
     }
64 64
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public function up(): void
13 13
     {
14 14
       //Action when migrate up
15
-        $this->create('configurations', function (CreateTable $table) {
15
+        $this->create('configurations', function(CreateTable $table) {
16 16
             $table->integer('id')
17 17
                   ->autoincrement()
18 18
                  ->primary();
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,11 @@
 block discarded – undo
7 7
 use Platine\Database\Schema\CreateTable;
8 8
 use Platine\Framework\Migration\AbstractMigration;
9 9
 
10
-class AddConfigurationTable20220109074106 extends AbstractMigration
11
-{
10
+class AddConfigurationTable20220109074106 extends AbstractMigration {
12 11
     public function up(): void
13 12
     {
14 13
       //Action when migrate up
15
-        $this->create('configurations', function (CreateTable $table) {
14
+        $this->create('configurations', function (CreateTable $table) {
16 15
             $table->integer('id')
17 16
                   ->autoincrement()
18 17
                  ->primary();
Please login to merge, or discard this patch.
storage/migrations/20220323_095520_add_audits_table.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -11,32 +11,32 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function up(): void
13 13
     {
14
-      //Action when migrate up
14
+        //Action when migrate up
15 15
         $this->create('audits', function (CreateTable $table) {
16 16
             $table->integer('id')
17
-                  ->autoincrement()
18
-                 ->primary();
17
+                    ->autoincrement()
18
+                    ->primary();
19 19
 
20 20
             $table->string('event')
21
-                 ->description('The audit event')
22
-                 ->index()
23
-                 ->notNull();
21
+                    ->description('The audit event')
22
+                    ->index()
23
+                    ->notNull();
24 24
 
25 25
             $table->text('detail')
26
-                       ->description('The audit detail');
26
+                        ->description('The audit detail');
27 27
 
28 28
             $table->string('url')
29
-                 ->description('The url for this audit');
29
+                    ->description('The url for this audit');
30 30
 
31 31
             $table->string('ip')
32
-                 ->description('The ip address')
33
-                 ->notNull();
32
+                    ->description('The ip address')
33
+                    ->notNull();
34 34
 
35 35
             $table->string('user_agent')
36
-                 ->description('The user agent');
36
+                    ->description('The user agent');
37 37
 
38 38
             $table->string('tags')
39
-                 ->description('The audit tags');
39
+                    ->description('The audit tags');
40 40
 
41 41
             $table->datetime('date')
42 42
                         ->description('audit date')
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function down(): void
58 58
     {
59
-      //Action when migrate down
59
+        //Action when migrate down
60 60
         $this->drop('audits');
61 61
     }
62 62
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public function up(): void
13 13
     {
14 14
       //Action when migrate up
15
-        $this->create('audits', function (CreateTable $table) {
15
+        $this->create('audits', function(CreateTable $table) {
16 16
             $table->integer('id')
17 17
                   ->autoincrement()
18 18
                  ->primary();
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,11 @@
 block discarded – undo
7 7
 use Platine\Database\Schema\CreateTable;
8 8
 use Platine\Framework\Migration\AbstractMigration;
9 9
 
10
-class AddAuditsTable20220323095520 extends AbstractMigration
11
-{
10
+class AddAuditsTable20220323095520 extends AbstractMigration {
12 11
     public function up(): void
13 12
     {
14 13
       //Action when migrate up
15
-        $this->create('audits', function (CreateTable $table) {
14
+        $this->create('audits', function (CreateTable $table) {
16 15
             $table->integer('id')
17 16
                   ->autoincrement()
18 17
                  ->primary();
Please login to merge, or discard this patch.