It seems like backpack_url('dashboard') targeting backpack_url() can also be of type object<Illuminate\Contracts\Routing\UrlGenerator>; however, redirect() does only seem to accept string|null, maybe add an additional type check?
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.