Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
Adds types to stubs (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro authored Jan 3, 2023
1 parent bd7dc84 commit 6f389b6
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions stubs/VaporUiServiceProvider.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

namespace App\Providers;

use App\Models\User;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;

class VaporUiServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
public function boot(): void
{
$this->gate();
}
Expand All @@ -21,12 +20,10 @@ class VaporUiServiceProvider extends ServiceProvider
* Register the Vapor UI gate.
*
* This gate determines who can access Vapor UI in non-local environments.
*
* @return void
*/
protected function gate()
protected function gate(): void
{
Gate::define('viewVaporUI', function ($user = null) {
Gate::define('viewVaporUI', function (User $user = null) {
return in_array(optional($user)->email, [
//
]);
Expand All @@ -35,10 +32,8 @@ class VaporUiServiceProvider extends ServiceProvider

/**
* Register any application services.
*
* @return void
*/
public function register()
public function register(): void
{
//
}
Expand Down

0 comments on commit 6f389b6

Please sign in to comment.