diff --git a/2.x/features/authentication.md b/2.x/features/authentication.md index 58ae030..5f88606 100644 --- a/2.x/features/authentication.md +++ b/2.x/features/authentication.md @@ -31,10 +31,8 @@ use Laravel\Fortify\Fortify; /** * Bootstrap any application services. - * - * @return void */ -public function boot() +public function boot(): void { Fortify::loginView(function () { return view('auth.login'); @@ -75,10 +73,8 @@ use Laravel\Fortify\Fortify; /** * Bootstrap any application services. - * - * @return void */ -public function boot() +public function boot(): void { // ... diff --git a/2.x/features/password-confirmation.md b/2.x/features/password-confirmation.md index f2080ae..d293043 100644 --- a/2.x/features/password-confirmation.md +++ b/2.x/features/password-confirmation.md @@ -57,10 +57,8 @@ After adding this trait to a component, you should call the `ensurePasswordIsCon ```php /** * Enable administration mode for user. - * - * @return void */ -public function enableAdminMode() +public function enableAdminMode(): void { $this->ensurePasswordIsConfirmed(); @@ -129,10 +127,8 @@ After adding the `confirms-password` component to your application's user interf ```php /** * Enable administration mode for user. - * - * @return void */ -public function enableAdminMode() +public function enableAdminMode(): void { $this->ensurePasswordIsConfirmed(); @@ -185,19 +181,18 @@ Once the user has confirmed their password, they will not be required to re-ente Sometimes, you may wish to customize how the user's password is validated during confirmation. To do so, you may use the `Fortify::confirmPasswordsUsing` method. This method accepts a closure that receives the authenticated user instance and the `password` input field of the request. The closure should return `true` if the password is valid for the given user. Typically, this method should be called from the `boot` method of your `JetstreamServiceProvider`: ```php +use App\Models\User; use Illuminate\Support\Facades\Hash; use Laravel\Fortify\Fortify; /** * Bootstrap any application services. - * - * @return void */ -public function boot() +public function boot(): void { // ... - Fortify::confirmPasswordsUsing(function ($user, string $password) { + Fortify::confirmPasswordsUsing(function (User $user, string $password) { return Hash::check($password, $user->password); }); } diff --git a/2.x/features/registration.md b/2.x/features/registration.md index 436f39f..178bda9 100644 --- a/2.x/features/registration.md +++ b/2.x/features/registration.md @@ -57,10 +57,8 @@ use Laravel\Fortify\Fortify; /** * Bootstrap any application services. - * - * @return void */ -public function boot() +public function boot(): void { Fortify::registerView(function () { return view('auth.register'); diff --git a/2.x/features/teams.md b/2.x/features/teams.md index 418d526..cee2fbd 100644 --- a/2.x/features/teams.md +++ b/2.x/features/teams.md @@ -197,12 +197,8 @@ When building a Jetstream application that provides both API support and team su ```php /** * Determine whether the user can view a flight. - * - * @param \App\Models\User $user - * @param \App\Models\Flight $flight - * @return bool */ -public function view(User $user, Flight $flight) +public function view(User $user, Flight $flight): bool { return $user->belongsToTeam($flight->team) && $user->hasTeamPermission($flight->team, 'flight:view') && diff --git a/2.x/stacks/inertia.md b/2.x/stacks/inertia.md index 1e85121..b9dc7cb 100644 --- a/2.x/stacks/inertia.md +++ b/2.x/stacks/inertia.md @@ -11,14 +11,12 @@ In other words, this stack gives you the full power of Vue.js without the comple ```php use Illuminate\Http\Request; use Inertia\Inertia; +use Inertia\Response; /** * Show the general profile settings screen. - * - * @param \Illuminate\Http\Request $request - * @return \Inertia\Response */ -public function show(Request $request) +public function show(Request $request): Response { return Inertia::render('Profile/Show', [ 'sessions' => $this->sessions($request)->all(), @@ -51,10 +49,8 @@ use Laravel\Jetstream\Jetstream; /** * Bootstrap any application services. - * - * @return void */ -public function boot() +public function boot(): void { // ... diff --git a/examples.md b/examples.md index 1dc8c93..1639f7d 100644 --- a/examples.md +++ b/examples.md @@ -54,10 +54,8 @@ class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services. - * - * @return void */ - public function boot() + public function boot(): void { Queue::before(function (JobProcessing $event) { // $event->connectionName @@ -74,10 +72,8 @@ class AppServiceProvider extends ServiceProvider /** * Register the service provider. - * - * @return void */ - public function register() + public function register(): void { // }