mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Add PHP type hints for Laravel 10
This commit is contained in:
committed by
HolgerHatGarKeineNode
parent
ad55c69b51
commit
98a430c91c
@@ -20,7 +20,7 @@ class CreateNewUser implements CreatesNewUsers
|
||||
* @param array $input
|
||||
* @return \App\Models\User
|
||||
*/
|
||||
public function create(array $input)
|
||||
public function create(array $input): User
|
||||
{
|
||||
Validator::make($input, [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
@@ -49,7 +49,7 @@ class CreateNewUser implements CreatesNewUsers
|
||||
* @param \App\Models\User $user
|
||||
* @return void
|
||||
*/
|
||||
protected function createTeam(User $user)
|
||||
protected function createTeam(User $user): void
|
||||
{
|
||||
$user->ownedTeams()
|
||||
->save(Team::forceCreate([
|
||||
|
||||
@@ -11,7 +11,7 @@ trait PasswordValidationRules
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function passwordRules()
|
||||
protected function passwordRules(): array
|
||||
{
|
||||
return ['required', 'string', new Password, 'confirmed'];
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class ResetUserPassword implements ResetsUserPasswords
|
||||
* @param array $input
|
||||
* @return void
|
||||
*/
|
||||
public function reset($user, array $input)
|
||||
public function reset($user, array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'password' => $this->passwordRules(),
|
||||
|
||||
@@ -17,7 +17,7 @@ class UpdateUserPassword implements UpdatesUserPasswords
|
||||
* @param array $input
|
||||
* @return void
|
||||
*/
|
||||
public function update($user, array $input)
|
||||
public function update($user, array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'current_password' => ['required', 'string', 'current_password:web'],
|
||||
|
||||
@@ -16,7 +16,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
* @param array $input
|
||||
* @return void
|
||||
*/
|
||||
public function update($user, array $input)
|
||||
public function update($user, array $input): void
|
||||
{
|
||||
Validator::make($input, [
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
@@ -59,7 +59,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
* @param array $input
|
||||
* @return void
|
||||
*/
|
||||
protected function updateVerifiedUser($user, array $input)
|
||||
protected function updateVerifiedUser($user, array $input): void
|
||||
{
|
||||
$user->forceFill([
|
||||
'name' => $input['name'],
|
||||
|
||||
Reference in New Issue
Block a user