Skip to content

Commit 8a62ca2

Browse files
authored
Improves generic types on the skeleton (laravel#5740)
1 parent 7bf3228 commit 8a62ca2

12 files changed

+18
-18
lines changed

app/Exceptions/Handler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Handler extends ExceptionHandler
1010
/**
1111
* A list of the exception types that are not reported.
1212
*
13-
* @var string[]
13+
* @var array<int, class-string<Throwable>>
1414
*/
1515
protected $dontReport = [
1616
//
@@ -19,7 +19,7 @@ class Handler extends ExceptionHandler
1919
/**
2020
* A list of the inputs that are never flashed for validation exceptions.
2121
*
22-
* @var string[]
22+
* @var array<int, string>
2323
*/
2424
protected $dontFlash = [
2525
'current_password',

app/Http/Kernel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Kernel extends HttpKernel
1111
*
1212
* These middleware are run during every request to your application.
1313
*
14-
* @var string[]
14+
* @var array<int, class-string|string>
1515
*/
1616
protected $middleware = [
1717
// \App\Http\Middleware\TrustHosts::class,
@@ -26,7 +26,7 @@ class Kernel extends HttpKernel
2626
/**
2727
* The application's route middleware groups.
2828
*
29-
* @var array<string, string[]>
29+
* @var array<string, array<int, class-string|string>>
3030
*/
3131
protected $middlewareGroups = [
3232
'web' => [
@@ -51,7 +51,7 @@ class Kernel extends HttpKernel
5151
*
5252
* These middleware may be assigned to groups or used individually.
5353
*
54-
* @var array<string, string>
54+
* @var array<string, class-string|string>
5555
*/
5656
protected $routeMiddleware = [
5757
'auth' => \App\Http\Middleware\Authenticate::class,

app/Http/Middleware/EncryptCookies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class EncryptCookies extends Middleware
99
/**
1010
* The names of the cookies that should not be encrypted.
1111
*
12-
* @var string[]
12+
* @var array<int, string>
1313
*/
1414
protected $except = [
1515
//

app/Http/Middleware/PreventRequestsDuringMaintenance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class PreventRequestsDuringMaintenance extends Middleware
99
/**
1010
* The URIs that should be reachable while maintenance mode is enabled.
1111
*
12-
* @var string[]
12+
* @var array<int, string>
1313
*/
1414
protected $except = [
1515
//

app/Http/Middleware/RedirectIfAuthenticated.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class RedirectIfAuthenticated
1313
* Handle an incoming request.
1414
*
1515
* @param \Illuminate\Http\Request $request
16-
* @param \Closure $next
16+
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
1717
* @param string|null ...$guards
18-
* @return mixed
18+
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
1919
*/
2020
public function handle(Request $request, Closure $next, ...$guards)
2121
{

app/Http/Middleware/TrimStrings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class TrimStrings extends Middleware
99
/**
1010
* The names of the attributes that should not be trimmed.
1111
*
12-
* @var string[]
12+
* @var array<int, string>
1313
*/
1414
protected $except = [
1515
'current_password',

app/Http/Middleware/TrustHosts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class TrustHosts extends Middleware
99
/**
1010
* Get the host patterns that should be trusted.
1111
*
12-
* @return string[]
12+
* @return array<int, string|null>
1313
*/
1414
public function hosts()
1515
{

app/Http/Middleware/TrustProxies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TrustProxies extends Middleware
1010
/**
1111
* The trusted proxies for this application.
1212
*
13-
* @var string[]|string|null
13+
* @var array<int, string>|string|null
1414
*/
1515
protected $proxies;
1616

app/Http/Middleware/VerifyCsrfToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class VerifyCsrfToken extends Middleware
99
/**
1010
* The URIs that should be excluded from CSRF verification.
1111
*
12-
* @var string[]
12+
* @var array<int, string>
1313
*/
1414
protected $except = [
1515
//

app/Models/User.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class User extends Authenticatable
1515
/**
1616
* The attributes that are mass assignable.
1717
*
18-
* @var string[]
18+
* @var array<int, string>
1919
*/
2020
protected $fillable = [
2121
'name',
@@ -26,7 +26,7 @@ class User extends Authenticatable
2626
/**
2727
* The attributes that should be hidden for serialization.
2828
*
29-
* @var array
29+
* @var array<int, string>
3030
*/
3131
protected $hidden = [
3232
'password',
@@ -36,7 +36,7 @@ class User extends Authenticatable
3636
/**
3737
* The attributes that should be cast.
3838
*
39-
* @var array
39+
* @var array<string, string>
4040
*/
4141
protected $casts = [
4242
'email_verified_at' => 'datetime',

app/Providers/AuthServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class AuthServiceProvider extends ServiceProvider
1010
/**
1111
* The policy mappings for the application.
1212
*
13-
* @var array<string, string>
13+
* @var array<class-string, class-string>
1414
*/
1515
protected $policies = [
1616
// 'App\Models\Model' => 'App\Policies\ModelPolicy',

app/Providers/EventServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class EventServiceProvider extends ServiceProvider
1212
/**
1313
* The event listener mappings for the application.
1414
*
15-
* @var array<string, string[]>
15+
* @var array<class-string, array<int, class-string>>
1616
*/
1717
protected $listen = [
1818
Registered::class => [

0 commit comments

Comments
 (0)