The method environment() does not exist on Illuminate\Container\Container. Are you sure you never get this type here, but always one of the subclasses?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
23
if (app()->/** @scrutinizer ignore-call */ environment(config('release-protection.email.envs.' . $guard, config('release-protection.email.envs.default')))) {
It seems like __(config('release-prote....not_logged.default'))) can also be of type array; however, parameter $message of abort() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
Accessing email on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?