@@ -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 |