Passed
Push — master ( c606fb...d7b7f6 )
by nguereza
11:42
created
app/Validator/ProductValidator.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
 class ProductValidator extends AbstractValidator
23 23
 {
24 24
     /**
25
-    * The parameter instance
26
-    * @var ProductParam<TEntity>
27
-    */
25
+     * The parameter instance
26
+     * @var ProductParam<TEntity>
27
+     */
28 28
     protected ProductParam $param;
29 29
 
30 30
     /**
31
-    * Create new instance
32
-    * @param ProductParam<TEntity> $param
33
-    * @param Lang $lang
34
-    */
31
+     * Create new instance
32
+     * @param ProductParam<TEntity> $param
33
+     * @param Lang $lang
34
+     */
35 35
     public function __construct(ProductParam $param, Lang $lang)
36 36
     {
37 37
         parent::__construct($lang);
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-    * {@inheritdoc}
43
-    */
42
+     * {@inheritdoc}
43
+     */
44 44
     public function setValidationData(): void
45 45
     {
46 46
         $this->addData('name', $this->param->getName());
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     }
52 52
 
53 53
     /**
54
-    * {@inheritdoc}
55
-    */
54
+     * {@inheritdoc}
55
+     */
56 56
     public function setValidationRules(): void
57 57
     {
58 58
         $this->addRules('name', [
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 * @package Platine\App\Validator
20 20
 * @template TEntity as \Platine\Orm\Entity
21 21
 */
22
-class ProductValidator extends AbstractValidator
23
-{
22
+class ProductValidator extends AbstractValidator {
24 23
     /**
25 24
     * The parameter instance
26 25
     * @var ProductParam<TEntity>
@@ -32,8 +31,7 @@  discard block
 block discarded – undo
32 31
     * @param ProductParam<TEntity> $param
33 32
     * @param Lang $lang
34 33
     */
35
-    public function __construct(ProductParam $param, Lang $lang)
36
-    {
34
+    public function __construct(ProductParam $param, Lang $lang) {
37 35
         parent::__construct($lang);
38 36
         $this->param = $param;
39 37
     }
Please login to merge, or discard this patch.
app/Http/Action/HomeAction.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
                                                         ->all();
160 160
 
161 161
         $context['product_amounts'] = $this->productRepository->query()
162
-                                                            ->sum(function (Expression $e) {
162
+                                                            ->sum(function(Expression $e) {
163 163
                                                                 $e->column('price')
164 164
                                                                   ->op('*')
165 165
                                                                   ->column('quantity');
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
         $context = [];
93 93
         $context['user_status'] = $this->statusList->getUserStatus();
94 94
         $context['total_user'] = $this->userRepository->query()
95
-                                                      ->count('id');
95
+                                                        ->count('id');
96 96
 
97 97
         $context['total_role'] = $this->roleRepository->query()
98
-                                                      ->count('id');
98
+                                                        ->count('id');
99 99
 
100 100
         $context['total_product_category'] = $this->productCategoryRepository->query()
101 101
                                                                             ->count('id');
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
         $context['product_amounts'] = $this->productRepository->query()
120 120
                                                             ->sum(function (Expression $e) {
121 121
                                                                 $e->column('price')
122
-                                                                  ->op('*')
123
-                                                                  ->column('quantity');
122
+                                                                    ->op('*')
123
+                                                                    ->column('quantity');
124 124
                                                             });
125 125
 
126 126
         return new TemplateResponse(
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@
 block discarded – undo
63 63
  * @class HomeAction
64 64
  * @package Platine\App\Http\Action
65 65
  */
66
-class HomeAction implements RequestHandlerInterface
67
-{
66
+class HomeAction implements RequestHandlerInterface {
68 67
     /**
69 68
      * Create new instance
70 69
      * @param Template $template
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000005_users_seed.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 
6 6
 use Platine\Framework\Migration\Seed\AbstractSeed;
7 7
 
8
-class UsersSeed20240616000005 extends AbstractSeed
9
-{
8
+class UsersSeed20240616000005 extends AbstractSeed {
10 9
 
11 10
     public function run(): void
12 11
     {
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000000_permissions_seed.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 
6 6
 use Platine\Framework\Migration\Seed\AbstractSeed;
7 7
 
8
-class PermissionsSeed20240616000000 extends AbstractSeed
9
-{
8
+class PermissionsSeed20240616000000 extends AbstractSeed {
10 9
 
11 10
     public function run(): void
12 11
     {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -18,28 +18,28 @@  discard block
 block discarded – undo
18 18
         'code' => 'permission_list',
19 19
         'description' => 'View permissions',
20 20
         'created_at' => '2023-12-06 00:21:14',
21
-        'updated_at' => NULL,
21
+        'updated_at' => null,
22 22
     ],
23 23
     1 => [
24 24
         'id' => 2,
25 25
         'code' => 'permission_create',
26 26
         'description' => 'Create permission',
27 27
         'created_at' => '2023-12-06 00:38:47',
28
-        'updated_at' => NULL,
28
+        'updated_at' => null,
29 29
     ],
30 30
     2 => [
31 31
         'id' => 3,
32 32
         'code' => 'permission_detail',
33 33
         'description' => 'View detail permission',
34 34
         'created_at' => '2023-12-06 00:39:33',
35
-        'updated_at' => NULL,
35
+        'updated_at' => null,
36 36
     ],
37 37
     3 => [
38 38
         'id' => 4,
39 39
         'code' => 'permission_update',
40 40
         'description' => 'Edit permission',
41 41
         'created_at' => '2023-12-06 00:39:54',
42
-        'updated_at' => NULL,
42
+        'updated_at' => null,
43 43
     ],
44 44
     4 => [
45 45
         'id' => 5,
@@ -53,28 +53,28 @@  discard block
 block discarded – undo
53 53
         'code' => 'role_list',
54 54
         'description' => 'View roles',
55 55
         'created_at' => '2023-12-06 00:21:14',
56
-        'updated_at' => NULL,
56
+        'updated_at' => null,
57 57
     ],
58 58
     6 => [
59 59
         'id' => 7,
60 60
         'code' => 'role_create',
61 61
         'description' => 'Create role',
62 62
         'created_at' => '2023-12-06 00:38:47',
63
-        'updated_at' => NULL,
63
+        'updated_at' => null,
64 64
     ],
65 65
     7 => [
66 66
         'id' => 8,
67 67
         'code' => 'role_detail',
68 68
         'description' => 'View detail role',
69 69
         'created_at' => '2023-12-06 00:39:33',
70
-        'updated_at' => NULL,
70
+        'updated_at' => null,
71 71
     ],
72 72
     8 => [
73 73
         'id' => 9,
74 74
         'code' => 'role_update',
75 75
         'description' => 'Edit role',
76 76
         'created_at' => '2023-12-06 00:39:54',
77
-        'updated_at' => NULL,
77
+        'updated_at' => null,
78 78
     ],
79 79
     9 => [
80 80
         'id' => 10,
@@ -88,28 +88,28 @@  discard block
 block discarded – undo
88 88
         'code' => 'user_list',
89 89
         'description' => 'View users',        
90 90
         'created_at' => '2023-12-06 00:21:14',
91
-        'updated_at' => NULL,
91
+        'updated_at' => null,
92 92
     ],
93 93
     11 => [
94 94
         'id' => 12,
95 95
         'code' => 'user_create',
96 96
         'description' => 'Create user',
97 97
         'created_at' => '2023-12-06 00:38:47',
98
-        'updated_at' => NULL,
98
+        'updated_at' => null,
99 99
     ],
100 100
     12 => [
101 101
         'id' => 13,
102 102
         'code' => 'user_detail',
103 103
         'description' => 'View detail user',
104 104
         'created_at' => '2023-12-06 00:39:33',
105
-        'updated_at' => NULL,
105
+        'updated_at' => null,
106 106
     ],
107 107
     13 => [
108 108
         'id' => 14,
109 109
         'code' => 'user_update',
110 110
         'description' => 'Edit user',
111 111
         'created_at' => '2023-12-06 00:39:54',
112
-        'updated_at' => NULL,
112
+        'updated_at' => null,
113 113
     ],
114 114
     14 => [
115 115
         'id' => 15,
@@ -123,28 +123,28 @@  discard block
 block discarded – undo
123 123
         'code' => 'product_category_list',
124 124
         'description' => 'View product categories',        
125 125
         'created_at' => '2023-12-06 00:21:14',
126
-        'updated_at' => NULL,
126
+        'updated_at' => null,
127 127
     ],
128 128
     16 => [
129 129
         'id' => 17,
130 130
         'code' => 'product_category_create',
131 131
         'description' => 'Create product category',
132 132
         'created_at' => '2023-12-06 00:38:47',
133
-        'updated_at' => NULL,
133
+        'updated_at' => null,
134 134
     ],
135 135
     17 => [
136 136
         'id' => 18,
137 137
         'code' => 'product_category_detail',
138 138
         'description' => 'View detail product category',
139 139
         'created_at' => '2023-12-06 00:39:33',
140
-        'updated_at' => NULL,
140
+        'updated_at' => null,
141 141
     ],
142 142
     18 => [
143 143
         'id' => 19,
144 144
         'code' => 'product_category_update',
145 145
         'description' => 'Edit product category',
146 146
         'created_at' => '2023-12-06 00:39:54',
147
-        'updated_at' => NULL,
147
+        'updated_at' => null,
148 148
     ],
149 149
     19 => [
150 150
         'id' => 20,
@@ -158,28 +158,28 @@  discard block
 block discarded – undo
158 158
         'code' => 'product_list',
159 159
         'description' => 'View products',        
160 160
         'created_at' => '2023-12-06 00:21:14',
161
-        'updated_at' => NULL,
161
+        'updated_at' => null,
162 162
     ],
163 163
     21 => [
164 164
         'id' => 22,
165 165
         'code' => 'product_create',
166 166
         'description' => 'Create product',
167 167
         'created_at' => '2023-12-06 00:38:47',
168
-        'updated_at' => NULL,
168
+        'updated_at' => null,
169 169
     ],
170 170
     22 => [
171 171
         'id' => 23,
172 172
         'code' => 'product_detail',
173 173
         'description' => 'View detail product',
174 174
         'created_at' => '2023-12-06 00:39:33',
175
-        'updated_at' => NULL,
175
+        'updated_at' => null,
176 176
     ],
177 177
     23 => [
178 178
         'id' => 24,
179 179
         'code' => 'product_update',
180 180
         'description' => 'Edit product',
181 181
         'created_at' => '2023-12-06 00:39:54',
182
-        'updated_at' => NULL,
182
+        'updated_at' => null,
183 183
     ],
184 184
     24 => [
185 185
         'id' => 25,
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000001_product_categories_seed.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 
6 6
 use Platine\Framework\Migration\Seed\AbstractSeed;
7 7
 
8
-class ProductCategoriesSeed20240616000001 extends AbstractSeed
9
-{
8
+class ProductCategoriesSeed20240616000001 extends AbstractSeed {
10 9
 
11 10
     public function run(): void
12 11
     {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,30 +16,30 @@
 block discarded – undo
16 16
     0 => [
17 17
         'id' => 1,
18 18
         'name' => 'Computer',
19
-        'description' => NULL,
19
+        'description' => null,
20 20
         'created_at' => '2023-12-07 05:54:51',
21 21
         'updated_at' => '2023-12-07 05:57:41',
22 22
     ],
23 23
     1 => [
24 24
         'id' => 2,
25 25
         'name' => 'Cars',
26
-        'description' => NULL,
26
+        'description' => null,
27 27
         'created_at' => '2023-12-07 05:55:06',
28
-        'updated_at' => NULL,
28
+        'updated_at' => null,
29 29
     ],
30 30
     2 => [
31 31
         'id' => 3,
32 32
         'name' => 'Medicaments ',
33
-        'description' => NULL,
33
+        'description' => null,
34 34
         'created_at' => '2023-12-07 05:55:19',
35
-        'updated_at' => NULL,
35
+        'updated_at' => null,
36 36
     ],
37 37
     3 => [
38 38
         'id' => 4,
39 39
         'name' => 'Others',
40
-        'description' => NULL,
40
+        'description' => null,
41 41
         'created_at' => '2023-12-07 05:55:28',
42
-        'updated_at' => NULL,
42
+        'updated_at' => null,
43 43
     ],
44 44
 ];
45 45
         foreach ($data as $row) {
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000003_roles_seed.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 
6 6
 use Platine\Framework\Migration\Seed\AbstractSeed;
7 7
 
8
-class RolesSeed20240616000003 extends AbstractSeed
9
-{
8
+class RolesSeed20240616000003 extends AbstractSeed {
10 9
 
11 10
     public function run(): void
12 11
     {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     0 => [
17 17
         'id' => 1,
18 18
         'name' => 'Administrator',
19
-        'description' => NULL,
19
+        'description' => null,
20 20
         'created_at' => '2023-12-06 00:37:48',
21 21
         'updated_at' => '2023-12-07 06:16:19',
22 22
     ],
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000004_roles_permissions_seed.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 
6 6
 use Platine\Framework\Migration\Seed\AbstractSeed;
7 7
 
8
-class RolesPermissionsSeed20240616000004 extends AbstractSeed
9
-{
8
+class RolesPermissionsSeed20240616000004 extends AbstractSeed {
10 9
 
11 10
     public function run(): void
12 11
     {
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000002_products_seed.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 
6 6
 use Platine\Framework\Migration\Seed\AbstractSeed;
7 7
 
8
-class ProductsSeed20240616000002 extends AbstractSeed
9
-{
8
+class ProductsSeed20240616000002 extends AbstractSeed {
10 9
 
11 10
     public function run(): void
12 11
     {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@
 block discarded – undo
16 16
     0 => [
17 17
         'id' => 1,
18 18
         'name' => 'Toyota Corolla Verso 1.8',
19
-        'description' => NULL,
19
+        'description' => null,
20 20
         'price' => 3467.0,
21 21
         'quantity' => 2.0,
22 22
         'product_category_id' => 2,
23 23
         'created_at' => '2023-12-07 06:21:59',
24
-        'updated_at' => NULL,
24
+        'updated_at' => null,
25 25
     ],
26 26
     1 => [
27 27
         'id' => 2,
28 28
         'name' => 'HP 840',
29
-        'description' => NULL,
29
+        'description' => null,
30 30
         'price' => 890.0,
31 31
         'quantity' => 14.0,
32 32
         'product_category_id' => 1,
Please login to merge, or discard this patch.
storage/migrations/seeds/20240616_000006_role_user_seed.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function run(): void
12 12
     {
13
-      //Action when run the seed
13
+        //Action when run the seed
14 14
       
15 15
         $data = [
16 16
     0 => [
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
 
6 6
 use Platine\Framework\Migration\Seed\AbstractSeed;
7 7
 
8
-class RoleUserSeed20240616000006 extends AbstractSeed
9
-{
8
+class RoleUserSeed20240616000006 extends AbstractSeed {
10 9
 
11 10
     public function run(): void
12 11
     {
Please login to merge, or discard this patch.