added PSR-12 rules

This commit is contained in:
2026-01-11 00:35:42 +01:00
parent fe1015bff1
commit eef3262a53
22 changed files with 372 additions and 278 deletions

View File

@@ -19,22 +19,22 @@ class CreateNewUser implements CreatesNewUsers
*/
public function create(array $input): User
{
Validator::make($input, [
Validator::make(data: $input, rules: [
'name' => ['required', 'string', 'max:255'],
'email' => [
'required',
'string',
'email',
'max:255',
Rule::unique(User::class),
Rule::unique(table: User::class),
],
'password' => $this->passwordRules(),
])->validate();
return User::create([
return User::create(attributes: [
'name' => $input['name'],
'email' => $input['email'],
'password' => Hash::make($input['password']),
'password' => Hash::make(value: $input['password']),
]);
}
}