From 71654810756f3be977359e5fdcd79375aab47c52 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Thu, 22 Sep 2022 15:12:05 +0100 Subject: [PATCH] Updated auth controllers with property types --- app/Http/Controllers/Auth/ConfirmEmailController.php | 6 +++--- app/Http/Controllers/Auth/LoginController.php | 4 ++-- app/Http/Controllers/Auth/RegisterController.php | 6 ++---- app/Http/Controllers/Auth/SocialController.php | 6 +++--- app/Http/Controllers/Auth/UserInviteController.php | 4 ++-- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/Auth/ConfirmEmailController.php b/app/Http/Controllers/Auth/ConfirmEmailController.php index 873d88475..ea633ff3a 100644 --- a/app/Http/Controllers/Auth/ConfirmEmailController.php +++ b/app/Http/Controllers/Auth/ConfirmEmailController.php @@ -14,9 +14,9 @@ use Illuminate\Http\Request; class ConfirmEmailController extends Controller { - protected $emailConfirmationService; - protected $loginService; - protected $userRepo; + protected EmailConfirmationService $emailConfirmationService; + protected LoginService $loginService; + protected UserRepo $userRepo; /** * Create a new controller instance. diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 1d6a36c5b..bf40b0e03 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -31,8 +31,8 @@ class LoginController extends Controller /** * Redirection paths. */ - protected $redirectTo = '/'; - protected $redirectPath = '/'; + protected string $redirectTo = '/'; + protected string $redirectPath = '/'; protected SocialAuthService $socialAuthService; protected LoginService $loginService; diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 15ee78d50..d74944800 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -35,11 +35,9 @@ class RegisterController extends Controller /** * Where to redirect users after login / registration. - * - * @var string */ - protected $redirectTo = '/'; - protected $redirectPath = '/'; + protected string $redirectTo = '/'; + protected string $redirectPath = '/'; /** * Create a new controller instance. diff --git a/app/Http/Controllers/Auth/SocialController.php b/app/Http/Controllers/Auth/SocialController.php index 1691668a2..cf7ae9041 100644 --- a/app/Http/Controllers/Auth/SocialController.php +++ b/app/Http/Controllers/Auth/SocialController.php @@ -16,9 +16,9 @@ use Laravel\Socialite\Contracts\User as SocialUser; class SocialController extends Controller { - protected $socialAuthService; - protected $registrationService; - protected $loginService; + protected SocialAuthService $socialAuthService; + protected RegistrationService $registrationService; + protected LoginService $loginService; /** * SocialController constructor. diff --git a/app/Http/Controllers/Auth/UserInviteController.php b/app/Http/Controllers/Auth/UserInviteController.php index 27b20f831..213959abd 100644 --- a/app/Http/Controllers/Auth/UserInviteController.php +++ b/app/Http/Controllers/Auth/UserInviteController.php @@ -15,8 +15,8 @@ use Illuminate\Validation\Rules\Password; class UserInviteController extends Controller { - protected $inviteService; - protected $userRepo; + protected UserInviteService $inviteService; + protected UserRepo $userRepo; /** * Create a new controller instance.