Passed
Push — master ( 11848a...152feb )
by nguereza
13:16 queued 12s
created
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/20210717_094822_add_permission_roles_table.php 1 patch
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.
storage/migrations/20210717_100434_add_role_users_table.php 1 patch
Indentation   +2 added lines, -2 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('roles_users', function (CreateTable $table) {
14 14
             $table->integer('user_id');
15 15
             $table->integer('role_id');
@@ -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('roles_users');
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
app/Param/AuthParam.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -14,32 +14,32 @@  discard block
 block discarded – undo
14 14
 class AuthParam extends BaseParam
15 15
 {
16 16
     /**
17
-    * The username field
18
-    * @var string
19
-    */
17
+     * The username field
18
+     * @var string
19
+     */
20 20
     protected string $username;
21 21
 
22 22
     /**
23
-    * The password field
24
-    * @var string
25
-    */
23
+     * The password field
24
+     * @var string
25
+     */
26 26
     protected string $password;
27 27
 
28 28
 
29 29
 
30 30
     /**
31
-    * Return the username value
32
-    * @return string
33
-    */
31
+     * Return the username value
32
+     * @return string
33
+     */
34 34
     public function getUsername(): string
35 35
     {
36 36
         return $this->username;
37 37
     }
38 38
 
39
-   /**
40
-    * Return the password value
41
-    * @return string
42
-    */
39
+    /**
40
+     * Return the password value
41
+     * @return string
42
+     */
43 43
     public function getPassword(): string
44 44
     {
45 45
         return $this->password;
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 
48 48
 
49 49
     /**
50
-    * Set the username value
51
-    * @param string $username
52
-    * @return $this
53
-    */
50
+     * Set the username value
51
+     * @param string $username
52
+     * @return $this
53
+     */
54 54
     public function setUsername(string $username): self
55 55
     {
56 56
         $this->username = $username;
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
         return $this;
59 59
     }
60 60
 
61
-   /**
62
-    * Set the password value
63
-    * @param string $password
64
-    * @return $this
65
-    */
61
+    /**
62
+     * Set the password value
63
+     * @param string $password
64
+     * @return $this
65
+     */
66 66
     public function setPassword(string $password): self
67 67
     {
68 68
         $this->password = $password;
Please login to merge, or discard this patch.
app/Param/RoleParam.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -15,28 +15,28 @@  discard block
 block discarded – undo
15 15
 class RoleParam extends BaseParam
16 16
 {
17 17
     /**
18
-    * The name field
19
-    * @var string
20
-    */
18
+     * The name field
19
+     * @var string
20
+     */
21 21
     protected string $name;
22 22
 
23 23
     /**
24
-    * The description field
25
-    * @var string|null
26
-    */
24
+     * The description field
25
+     * @var string|null
26
+     */
27 27
     protected ?string $description = null;
28 28
 
29 29
     /**
30
-    * The permissions field
31
-    * @var array<int>
32
-    */
30
+     * The permissions field
31
+     * @var array<int>
32
+     */
33 33
     protected array $permissions = [];
34 34
 
35 35
 
36 36
     /**
37
-    * @param TEntity $entity
38
-    * @return $this
39
-    */
37
+     * @param TEntity $entity
38
+     * @return $this
39
+     */
40 40
     public function fromEntity(Entity $entity): self
41 41
     {
42 42
         $this->name = $entity->name;
@@ -46,27 +46,27 @@  discard block
 block discarded – undo
46 46
     }
47 47
 
48 48
     /**
49
-    * Return the name value
50
-    * @return string
51
-    */
49
+     * Return the name value
50
+     * @return string
51
+     */
52 52
     public function getName(): string
53 53
     {
54 54
         return $this->name;
55 55
     }
56 56
 
57
-   /**
58
-    * Return the description value
59
-    * @return string|null
60
-    */
57
+    /**
58
+     * Return the description value
59
+     * @return string|null
60
+     */
61 61
     public function getDescription(): ?string
62 62
     {
63 63
         return $this->description;
64 64
     }
65 65
 
66
-   /**
67
-    * Return the permissions value
68
-    * @return array<int>
69
-    */
66
+    /**
67
+     * Return the permissions value
68
+     * @return array<int>
69
+     */
70 70
     public function getPermissions(): array
71 71
     {
72 72
         return $this->permissions;
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 
75 75
 
76 76
     /**
77
-    * Set the name value
78
-    * @param string $name
79
-    * @return $this
80
-    */
77
+     * Set the name value
78
+     * @param string $name
79
+     * @return $this
80
+     */
81 81
     public function setName(string $name): self
82 82
     {
83 83
         $this->name = $name;
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
         return $this;
86 86
     }
87 87
 
88
-   /**
89
-    * Set the description value
90
-    * @param string|null $description
91
-    * @return $this
92
-    */
88
+    /**
89
+     * Set the description value
90
+     * @param string|null $description
91
+     * @return $this
92
+     */
93 93
     public function setDescription(?string $description): self
94 94
     {
95 95
         $this->description = $description;
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
         return $this;
98 98
     }
99 99
 
100
-   /**
101
-    * Set the permissions value
102
-    * @param array<int> $permissions
103
-    * @return $this
104
-    */
100
+    /**
101
+     * Set the permissions value
102
+     * @param array<int> $permissions
103
+     * @return $this
104
+     */
105 105
     public function setPermissions(array $permissions): self
106 106
     {
107 107
         $this->permissions = $permissions;
Please login to merge, or discard this patch.
app/Provider/UserServiceProvider.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 class UserServiceProvider extends ServiceProvider
19 19
 {
20 20
     /**
21
-    * {@inheritdoc}
22
-    */
21
+     * {@inheritdoc}
22
+     */
23 23
     public function register(): void
24 24
     {
25 25
         // User
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 
36 36
 
37 37
     /**
38
-    * {@inheritdoc}
39
-    */
38
+     * {@inheritdoc}
39
+     */
40 40
     public function addRoutes(Router $router): void
41 41
     {
42 42
         $router->group('/user', function (Router $router) {
Please login to merge, or discard this patch.
app/Param/UserParam.php 1 patch
Indentation   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -15,64 +15,64 @@  discard block
 block discarded – undo
15 15
 class UserParam extends BaseParam
16 16
 {
17 17
     /**
18
-    * The username field
19
-    * @var string
20
-    */
18
+     * The username field
19
+     * @var string
20
+     */
21 21
     protected string $username;
22 22
 
23 23
     /**
24
-    * The lastname field
25
-    * @var string
26
-    */
24
+     * The lastname field
25
+     * @var string
26
+     */
27 27
     protected string $lastname;
28 28
 
29 29
     /**
30
-    * The firstname field
31
-    * @var string
32
-    */
30
+     * The firstname field
31
+     * @var string
32
+     */
33 33
     protected string $firstname;
34 34
 
35 35
     /**
36
-    * The email field
37
-    * @var string
38
-    */
36
+     * The email field
37
+     * @var string
38
+     */
39 39
     protected string $email;
40 40
 
41 41
     /**
42
-    * The password field
43
-    * @var string
44
-    */
42
+     * The password field
43
+     * @var string
44
+     */
45 45
     protected string $password;
46 46
 
47 47
     /**
48
-    * The password confirm field
49
-    * @var string
50
-    */
48
+     * The password confirm field
49
+     * @var string
50
+     */
51 51
     protected string $passwordConfirm;
52 52
 
53 53
     /**
54
-    * The status field
55
-    * @var string
56
-    */
54
+     * The status field
55
+     * @var string
56
+     */
57 57
     protected string $status;
58 58
 
59 59
     /**
60
-    * The role field
61
-    * @var string|null
62
-    */
60
+     * The role field
61
+     * @var string|null
62
+     */
63 63
     protected ?string $role = null;
64 64
 
65 65
     /**
66
-    * The roles field
67
-    * @var array<int>
68
-    */
66
+     * The roles field
67
+     * @var array<int>
68
+     */
69 69
     protected array $roles = [];
70 70
 
71 71
 
72 72
     /**
73
-    * @param TEntity $entity
74
-    * @return $this
75
-    */
73
+     * @param TEntity $entity
74
+     * @return $this
75
+     */
76 76
     public function fromEntity(Entity $entity): self
77 77
     {
78 78
         $this->username = $entity->username;
@@ -87,81 +87,81 @@  discard block
 block discarded – undo
87 87
     }
88 88
 
89 89
     /**
90
-    * Return the username value
91
-    * @return string
92
-    */
90
+     * Return the username value
91
+     * @return string
92
+     */
93 93
     public function getUsername(): string
94 94
     {
95 95
         return $this->username;
96 96
     }
97 97
 
98
-   /**
99
-    * Return the lastname value
100
-    * @return string
101
-    */
98
+    /**
99
+     * Return the lastname value
100
+     * @return string
101
+     */
102 102
     public function getLastname(): string
103 103
     {
104 104
         return $this->lastname;
105 105
     }
106 106
 
107
-   /**
108
-    * Return the firstname value
109
-    * @return string
110
-    */
107
+    /**
108
+     * Return the firstname value
109
+     * @return string
110
+     */
111 111
     public function getFirstname(): string
112 112
     {
113 113
         return $this->firstname;
114 114
     }
115 115
 
116
-   /**
117
-    * Return the email value
118
-    * @return string
119
-    */
116
+    /**
117
+     * Return the email value
118
+     * @return string
119
+     */
120 120
     public function getEmail(): string
121 121
     {
122 122
         return $this->email;
123 123
     }
124 124
 
125
-   /**
126
-    * Return the password value
127
-    * @return string
128
-    */
125
+    /**
126
+     * Return the password value
127
+     * @return string
128
+     */
129 129
     public function getPassword(): string
130 130
     {
131 131
         return $this->password;
132 132
     }
133 133
 
134
-   /**
135
-    * Return the password confirm value
136
-    * @return string
137
-    */
134
+    /**
135
+     * Return the password confirm value
136
+     * @return string
137
+     */
138 138
     public function getPasswordConfirm(): string
139 139
     {
140 140
         return $this->passwordConfirm;
141 141
     }
142 142
 
143
-   /**
144
-    * Return the status value
145
-    * @return string
146
-    */
143
+    /**
144
+     * Return the status value
145
+     * @return string
146
+     */
147 147
     public function getStatus(): string
148 148
     {
149 149
         return $this->status;
150 150
     }
151 151
 
152
-   /**
153
-    * Return the role value
154
-    * @return string|null
155
-    */
152
+    /**
153
+     * Return the role value
154
+     * @return string|null
155
+     */
156 156
     public function getRole(): ?string
157 157
     {
158 158
         return $this->role;
159 159
     }
160 160
 
161
-   /**
162
-    * Return the roles
163
-    * @return array<int>
164
-    */
161
+    /**
162
+     * Return the roles
163
+     * @return array<int>
164
+     */
165 165
     public function getRoles(): array
166 166
     {
167 167
         return $this->roles;
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
 
170 170
 
171 171
     /**
172
-    * Set the username value
173
-    * @param string $username
174
-    * @return $this
175
-    */
172
+     * Set the username value
173
+     * @param string $username
174
+     * @return $this
175
+     */
176 176
     public function setUsername(string $username): self
177 177
     {
178 178
         $this->username = $username;
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
         return $this;
181 181
     }
182 182
 
183
-   /**
184
-    * Set the lastname value
185
-    * @param string $lastname
186
-    * @return $this
187
-    */
183
+    /**
184
+     * Set the lastname value
185
+     * @param string $lastname
186
+     * @return $this
187
+     */
188 188
     public function setLastname(string $lastname): self
189 189
     {
190 190
         $this->lastname = $lastname;
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
         return $this;
193 193
     }
194 194
 
195
-   /**
196
-    * Set the firstname value
197
-    * @param string $firstname
198
-    * @return $this
199
-    */
195
+    /**
196
+     * Set the firstname value
197
+     * @param string $firstname
198
+     * @return $this
199
+     */
200 200
     public function setFirstname(string $firstname): self
201 201
     {
202 202
         $this->firstname = $firstname;
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
         return $this;
205 205
     }
206 206
 
207
-   /**
208
-    * Set the email value
209
-    * @param string $email
210
-    * @return $this
211
-    */
207
+    /**
208
+     * Set the email value
209
+     * @param string $email
210
+     * @return $this
211
+     */
212 212
     public function setEmail(string $email): self
213 213
     {
214 214
         $this->email = $email;
@@ -216,11 +216,11 @@  discard block
 block discarded – undo
216 216
         return $this;
217 217
     }
218 218
 
219
-   /**
220
-    * Set the password value
221
-    * @param string $password
222
-    * @return $this
223
-    */
219
+    /**
220
+     * Set the password value
221
+     * @param string $password
222
+     * @return $this
223
+     */
224 224
     public function setPassword(string $password): self
225 225
     {
226 226
         $this->password = $password;
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
         return $this;
229 229
     }
230 230
 
231
-   /**
232
-    * Set the password confirm value
233
-    * @param string $passwordConfirm
234
-    * @return $this
235
-    */
231
+    /**
232
+     * Set the password confirm value
233
+     * @param string $passwordConfirm
234
+     * @return $this
235
+     */
236 236
     public function setPasswordConfirm(string $passwordConfirm): self
237 237
     {
238 238
         $this->passwordConfirm = $passwordConfirm;
@@ -240,11 +240,11 @@  discard block
 block discarded – undo
240 240
         return $this;
241 241
     }
242 242
 
243
-   /**
244
-    * Set the status value
245
-    * @param string $status
246
-    * @return $this
247
-    */
243
+    /**
244
+     * Set the status value
245
+     * @param string $status
246
+     * @return $this
247
+     */
248 248
     public function setStatus(string $status): self
249 249
     {
250 250
         $this->status = $status;
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
         return $this;
253 253
     }
254 254
 
255
-   /**
256
-    * Set the role value
257
-    * @param string|null $role
258
-    * @return $this
259
-    */
255
+    /**
256
+     * Set the role value
257
+     * @param string|null $role
258
+     * @return $this
259
+     */
260 260
     public function setRole(?string $role): self
261 261
     {
262 262
         $this->role = $role;
@@ -264,11 +264,11 @@  discard block
 block discarded – undo
264 264
         return $this;
265 265
     }
266 266
 
267
-   /**
268
-    * Set the roles
269
-    * @param array<int> $roles
270
-    * @return $this
271
-    */
267
+    /**
268
+     * Set the roles
269
+     * @param array<int> $roles
270
+     * @return $this
271
+     */
272 272
     public function setRoles(array $roles): self
273 273
     {
274 274
         $this->roles = $roles;
Please login to merge, or discard this patch.
storage/migrations/20231207_053927_add_product_categories_table.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@
 block discarded – undo
14 14
         //Action when migrate up
15 15
         $this->create('product_categories', function (CreateTable $table) {
16 16
             $table->integer('id')
17
-                  ->autoincrement()
18
-                 ->primary();
17
+                    ->autoincrement()
18
+                    ->primary();
19 19
             
20 20
             $table->string('name')
21
-                 ->description('The category name')
22
-                 ->notNull();
21
+                    ->description('The category name')
22
+                    ->notNull();
23 23
             
24 24
             $table->string('description')
25
-                 ->description('The category description');
25
+                    ->description('The category description');
26 26
             
27 27
             $table->timestamps();
28 28
 
Please login to merge, or discard this patch.
app/Provider/ProductServiceProvider.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 class ProductServiceProvider extends ServiceProvider
17 17
 {
18 18
     /**
19
-    * {@inheritdoc}
20
-    */
19
+     * {@inheritdoc}
20
+     */
21 21
     public function register(): void
22 22
     {
23 23
         $this->app->bind(ProductCategoryRepository::class);
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 
28 28
     /**
29
-    * {@inheritdoc}
30
-    */
29
+     * {@inheritdoc}
30
+     */
31 31
     public function addRoutes(Router $router): void
32 32
     {
33 33
         $router->group('/product', function (Router $router) {
Please login to merge, or discard this patch.