@@ -10,7 +10,7 @@ |
||
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 => [ |
@@ -5,8 +5,7 @@ |
||
5 | 5 | |
6 | 6 | use Platine\Framework\Migration\Seed\AbstractSeed; |
7 | 7 | |
8 | -class ProductsSeed extends AbstractSeed |
|
9 | -{ |
|
8 | +class ProductsSeed extends AbstractSeed { |
|
10 | 9 | |
11 | 10 | public function run(): void |
12 | 11 | { |
@@ -16,17 +16,17 @@ |
||
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, |
@@ -5,8 +5,7 @@ |
||
5 | 5 | |
6 | 6 | use Platine\Framework\Migration\Seed\AbstractSeed; |
7 | 7 | |
8 | -class PermissionsSeed extends AbstractSeed |
|
9 | -{ |
|
8 | +class PermissionsSeed extends AbstractSeed { |
|
10 | 9 | |
11 | 10 | public function run(): void |
12 | 11 | { |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | 'id' => 1, |
18 | 18 | 'code' => 'permission_list', |
19 | 19 | 'description' => 'View permissions', |
20 | - 'depend' => NULL, |
|
20 | + 'depend' => null, |
|
21 | 21 | 'created_at' => '2023-12-06 00:21:14', |
22 | - 'updated_at' => NULL, |
|
22 | + 'updated_at' => null, |
|
23 | 23 | ], |
24 | 24 | 1 => [ |
25 | 25 | 'id' => 2, |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | 'description' => 'Create permission', |
28 | 28 | 'depend' => 'permission_list', |
29 | 29 | 'created_at' => '2023-12-06 00:38:47', |
30 | - 'updated_at' => NULL, |
|
30 | + 'updated_at' => null, |
|
31 | 31 | ], |
32 | 32 | 2 => [ |
33 | 33 | 'id' => 3, |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | 'description' => 'View detail permission', |
36 | 36 | 'depend' => 'permission_list', |
37 | 37 | 'created_at' => '2023-12-06 00:39:33', |
38 | - 'updated_at' => NULL, |
|
38 | + 'updated_at' => null, |
|
39 | 39 | ], |
40 | 40 | 3 => [ |
41 | 41 | 'id' => 4, |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | 'description' => 'Edit permission', |
44 | 44 | 'depend' => 'permission_detail', |
45 | 45 | 'created_at' => '2023-12-06 00:39:54', |
46 | - 'updated_at' => NULL, |
|
46 | + 'updated_at' => null, |
|
47 | 47 | ], |
48 | 48 | 4 => [ |
49 | 49 | 'id' => 5, |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | 'id' => 6, |
58 | 58 | 'code' => 'role_list', |
59 | 59 | 'description' => 'View roles', |
60 | - 'depend' => NULL, |
|
60 | + 'depend' => null, |
|
61 | 61 | 'created_at' => '2023-12-06 00:21:14', |
62 | - 'updated_at' => NULL, |
|
62 | + 'updated_at' => null, |
|
63 | 63 | ], |
64 | 64 | 6 => [ |
65 | 65 | 'id' => 7, |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'description' => 'Create role', |
68 | 68 | 'depend' => 'role_list', |
69 | 69 | 'created_at' => '2023-12-06 00:38:47', |
70 | - 'updated_at' => NULL, |
|
70 | + 'updated_at' => null, |
|
71 | 71 | ], |
72 | 72 | 7 => [ |
73 | 73 | 'id' => 8, |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 'description' => 'View detail role', |
76 | 76 | 'depend' => 'role_list', |
77 | 77 | 'created_at' => '2023-12-06 00:39:33', |
78 | - 'updated_at' => NULL, |
|
78 | + 'updated_at' => null, |
|
79 | 79 | ], |
80 | 80 | 8 => [ |
81 | 81 | 'id' => 9, |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | 'description' => 'Edit role', |
84 | 84 | 'depend' => 'role_detail', |
85 | 85 | 'created_at' => '2023-12-06 00:39:54', |
86 | - 'updated_at' => NULL, |
|
86 | + 'updated_at' => null, |
|
87 | 87 | ], |
88 | 88 | 9 => [ |
89 | 89 | 'id' => 10, |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | 'id' => 11, |
98 | 98 | 'code' => 'user_list', |
99 | 99 | 'description' => 'View users', |
100 | - 'depend' => NULL, |
|
100 | + 'depend' => null, |
|
101 | 101 | 'created_at' => '2023-12-06 00:21:14', |
102 | - 'updated_at' => NULL, |
|
102 | + 'updated_at' => null, |
|
103 | 103 | ], |
104 | 104 | 11 => [ |
105 | 105 | 'id' => 12, |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | 'description' => 'Create user', |
108 | 108 | 'depend' => 'user_list', |
109 | 109 | 'created_at' => '2023-12-06 00:38:47', |
110 | - 'updated_at' => NULL, |
|
110 | + 'updated_at' => null, |
|
111 | 111 | ], |
112 | 112 | 12 => [ |
113 | 113 | 'id' => 13, |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | 'description' => 'View detail user', |
116 | 116 | 'depend' => 'user_list', |
117 | 117 | 'created_at' => '2023-12-06 00:39:33', |
118 | - 'updated_at' => NULL, |
|
118 | + 'updated_at' => null, |
|
119 | 119 | ], |
120 | 120 | 13 => [ |
121 | 121 | 'id' => 14, |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | 'description' => 'Edit user', |
124 | 124 | 'depend' => 'user_detail', |
125 | 125 | 'created_at' => '2023-12-06 00:39:54', |
126 | - 'updated_at' => NULL, |
|
126 | + 'updated_at' => null, |
|
127 | 127 | ], |
128 | 128 | 14 => [ |
129 | 129 | 'id' => 15, |
@@ -137,9 +137,9 @@ discard block |
||
137 | 137 | 'id' => 16, |
138 | 138 | 'code' => 'product_category_list', |
139 | 139 | 'description' => 'View product categories', |
140 | - 'depend' => NULL, |
|
140 | + 'depend' => null, |
|
141 | 141 | 'created_at' => '2023-12-06 00:21:14', |
142 | - 'updated_at' => NULL, |
|
142 | + 'updated_at' => null, |
|
143 | 143 | ], |
144 | 144 | 16 => [ |
145 | 145 | 'id' => 17, |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'description' => 'Create product category', |
148 | 148 | 'depend' => 'product_category_list', |
149 | 149 | 'created_at' => '2023-12-06 00:38:47', |
150 | - 'updated_at' => NULL, |
|
150 | + 'updated_at' => null, |
|
151 | 151 | ], |
152 | 152 | 17 => [ |
153 | 153 | 'id' => 18, |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | 'description' => 'View detail product category', |
156 | 156 | 'depend' => 'product_category_list', |
157 | 157 | 'created_at' => '2023-12-06 00:39:33', |
158 | - 'updated_at' => NULL, |
|
158 | + 'updated_at' => null, |
|
159 | 159 | ], |
160 | 160 | 18 => [ |
161 | 161 | 'id' => 19, |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | 'description' => 'Edit product category', |
164 | 164 | 'depend' => 'product_category_detail', |
165 | 165 | 'created_at' => '2023-12-06 00:39:54', |
166 | - 'updated_at' => NULL, |
|
166 | + 'updated_at' => null, |
|
167 | 167 | ], |
168 | 168 | 19 => [ |
169 | 169 | 'id' => 20, |
@@ -177,9 +177,9 @@ discard block |
||
177 | 177 | 'id' => 21, |
178 | 178 | 'code' => 'product_list', |
179 | 179 | 'description' => 'View products', |
180 | - 'depend' => NULL, |
|
180 | + 'depend' => null, |
|
181 | 181 | 'created_at' => '2023-12-06 00:21:14', |
182 | - 'updated_at' => NULL, |
|
182 | + 'updated_at' => null, |
|
183 | 183 | ], |
184 | 184 | 21 => [ |
185 | 185 | 'id' => 22, |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | 'description' => 'Create product', |
188 | 188 | 'depend' => 'product_list', |
189 | 189 | 'created_at' => '2023-12-06 00:38:47', |
190 | - 'updated_at' => NULL, |
|
190 | + 'updated_at' => null, |
|
191 | 191 | ], |
192 | 192 | 22 => [ |
193 | 193 | 'id' => 23, |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | 'description' => 'View detail product', |
196 | 196 | 'depend' => 'product_list', |
197 | 197 | 'created_at' => '2023-12-06 00:39:33', |
198 | - 'updated_at' => NULL, |
|
198 | + 'updated_at' => null, |
|
199 | 199 | ], |
200 | 200 | 23 => [ |
201 | 201 | 'id' => 24, |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | 'description' => 'Edit product', |
204 | 204 | 'depend' => 'product_detail', |
205 | 205 | 'created_at' => '2023-12-06 00:39:54', |
206 | - 'updated_at' => NULL, |
|
206 | + 'updated_at' => null, |
|
207 | 207 | ], |
208 | 208 | 24 => [ |
209 | 209 | 'id' => 25, |
@@ -10,7 +10,7 @@ |
||
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 => [ |
@@ -5,8 +5,7 @@ |
||
5 | 5 | |
6 | 6 | use Platine\Framework\Migration\Seed\AbstractSeed; |
7 | 7 | |
8 | -class RolesPermissionsSeed extends AbstractSeed |
|
9 | -{ |
|
8 | +class RolesPermissionsSeed extends AbstractSeed { |
|
10 | 9 | |
11 | 10 | public function run(): void |
12 | 11 | { |
@@ -10,7 +10,7 @@ |
||
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 => [ |
@@ -5,8 +5,7 @@ |
||
5 | 5 | |
6 | 6 | use Platine\Framework\Migration\Seed\AbstractSeed; |
7 | 7 | |
8 | -class RolesSeed extends AbstractSeed |
|
9 | -{ |
|
8 | +class RolesSeed extends AbstractSeed { |
|
10 | 9 | |
11 | 10 | public function run(): void |
12 | 11 | { |
@@ -16,7 +16,7 @@ |
||
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 | ], |
@@ -10,7 +10,7 @@ |
||
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 => [ |
@@ -5,8 +5,7 @@ |
||
5 | 5 | |
6 | 6 | use Platine\Framework\Migration\Seed\AbstractSeed; |
7 | 7 | |
8 | -class RoleUserSeed extends AbstractSeed |
|
9 | -{ |
|
8 | +class RoleUserSeed extends AbstractSeed { |
|
10 | 9 | |
11 | 10 | public function run(): void |
12 | 11 | { |
@@ -10,7 +10,7 @@ |
||
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 => [ |
@@ -5,8 +5,7 @@ |
||
5 | 5 | |
6 | 6 | use Platine\Framework\Migration\Seed\AbstractSeed; |
7 | 7 | |
8 | -class ProductCategoriesSeed extends AbstractSeed |
|
9 | -{ |
|
8 | +class ProductCategoriesSeed extends AbstractSeed { |
|
10 | 9 | |
11 | 10 | public function run(): void |
12 | 11 | { |
@@ -16,30 +16,30 @@ |
||
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) { |
@@ -10,7 +10,7 @@ |
||
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 => [ |
@@ -5,8 +5,7 @@ |
||
5 | 5 | |
6 | 6 | use Platine\Framework\Migration\Seed\AbstractSeed; |
7 | 7 | |
8 | -class UsersSeed extends AbstractSeed |
|
9 | -{ |
|
8 | +class UsersSeed extends AbstractSeed { |
|
10 | 9 | |
11 | 10 | public function run(): void |
12 | 11 | { |
@@ -10,7 +10,7 @@ |
||
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 => [ |
@@ -72,33 +72,33 @@ discard block |
||
72 | 72 | protected Template $template; |
73 | 73 | |
74 | 74 | /** |
75 | - * The ProductCategoryRepository instance |
|
76 | - * @var ProductCategoryRepository |
|
77 | - */ |
|
75 | + * The ProductCategoryRepository instance |
|
76 | + * @var ProductCategoryRepository |
|
77 | + */ |
|
78 | 78 | protected ProductCategoryRepository $productCategoryRepository; |
79 | 79 | |
80 | 80 | /** |
81 | - * The ProductRepository instance |
|
82 | - * @var ProductRepository |
|
83 | - */ |
|
81 | + * The ProductRepository instance |
|
82 | + * @var ProductRepository |
|
83 | + */ |
|
84 | 84 | protected ProductRepository $productRepository; |
85 | 85 | |
86 | 86 | /** |
87 | - * The RoleRepository instance |
|
88 | - * @var RoleRepository |
|
89 | - */ |
|
87 | + * The RoleRepository instance |
|
88 | + * @var RoleRepository |
|
89 | + */ |
|
90 | 90 | protected RoleRepository $roleRepository; |
91 | 91 | |
92 | 92 | /** |
93 | - * The UserRepository instance |
|
94 | - * @var UserRepository |
|
95 | - */ |
|
93 | + * The UserRepository instance |
|
94 | + * @var UserRepository |
|
95 | + */ |
|
96 | 96 | protected UserRepository $userRepository; |
97 | 97 | |
98 | 98 | /** |
99 | - * The StatusList instance |
|
100 | - * @var StatusList |
|
101 | - */ |
|
99 | + * The StatusList instance |
|
100 | + * @var StatusList |
|
101 | + */ |
|
102 | 102 | protected StatusList $statusList; |
103 | 103 | |
104 | 104 | /** |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | $context = []; |
135 | 135 | $context['user_status'] = $this->statusList->getUserStatus(); |
136 | 136 | $context['total_user'] = $this->userRepository->query() |
137 | - ->count('id'); |
|
137 | + ->count('id'); |
|
138 | 138 | |
139 | 139 | $context['total_role'] = $this->roleRepository->query() |
140 | - ->count('id'); |
|
140 | + ->count('id'); |
|
141 | 141 | |
142 | 142 | $context['total_product_category'] = $this->productCategoryRepository->query() |
143 | 143 | ->count('id'); |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | $context['product_amounts'] = $this->productRepository->query() |
162 | 162 | ->sum(function (Expression $e) { |
163 | 163 | $e->column('price') |
164 | - ->op('*') |
|
165 | - ->column('quantity'); |
|
164 | + ->op('*') |
|
165 | + ->column('quantity'); |
|
166 | 166 | }); |
167 | 167 | |
168 | 168 | return new TemplateResponse( |
@@ -159,7 +159,7 @@ |
||
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'); |
@@ -63,8 +63,7 @@ |
||
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 | * The template instance |
70 | 69 | * @var Template |