murtaza1904's avatar

Property type hint warning by "nunomaduro/phpinsights"

How to solve this warning return by phpinsights package in Laravel v11 application

Property \App\Models\User::$hidden does not have native type hint for its value but it should be possible to add it based on @var annotation "array<int, string>"

Code:

/**
     * The attributes that should be hidden.
     *
     * @var array<int, string>
     */
    protected $hidden = [
        'password',
        'remember_token',
    ];
0 likes
0 replies

Please or to participate in this conversation.