I’m using larastan on a Laravel project.
When I use a facade like ¥Auth::check() like code below, larastan can’t resolve the return type of this method.
function index()
{
if(¥Auth::check()) { // as mixed
// ...
}
}
I know it’s resolved by adding a use operator with IlluminateSupportFacadesAuth; and using Auth::check() instead.
use IlluminateSupportFacadesAuth;
function index()
{
if(Auth::check()) { // as bool
// ...
}
}
Is it not recommended to use alias of facades with larastan?
Let me know the best practice if there are some way to use facade alias with larastan.