Add PHP type hints for Laravel 10

This commit is contained in:
Shift
2023-02-15 00:30:18 +00:00
parent 8df1f36d9a
commit af180307a6
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ class Authenticate extends Middleware
/**
* Get the path the user should be redirected to when they are not authenticated.
*/
protected function redirectTo($request)
protected function redirectTo($request): ?string
{
if (! $request->expectsJson()) {
return route('login');
@@ -22,7 +22,7 @@ class RedirectIfAuthenticated
/**
* Handle an incoming request.
*/
public function handle(Request $request, Closure $next, ...$guards): mixed
public function handle(Request $request, Closure $next, string ...$guards): mixed
{
$guards = empty($guards) ? [null] : $guards;
+1 -1
View File
@@ -97,7 +97,7 @@ class EventServiceProvider extends ServiceProvider
*
* @return bool
*/
public function shouldDiscoverEvents()
public function shouldDiscoverEvents(): bool
{
return false;
}