Caleb White

Results 344 comments of Caleb White

Yes, it's automatically selected on page load

> It should not be used as "IDE" or coding editor. I understand that, but there have been cases where I tried to apply the rules, but something was messed...

If your builder is not generic, then you need to return just `App\Builders\UserBuilder` instead of `App\Builders\UserBuilder`---or you can just make the builder generic

No it doesn't have to be, especially since it's a **User** builder that will likely only be used with Users. You would really only need to make it generic if...

This doesn't just affect appending attributes to a model---all Laravel 9 style accessors and mutators should be `protected`---the method isn't even considered to be an attribute if it's not: https://github.com/larastan/larastan/blob/ebe6ef53ab4fd2a4c60d8a37b042ea8c370313fd/src/Properties/ModelPropertyHelper.php#L157-L178

> To be clear, this issue is requesting only a change in the error message text, to make it more obvious that the method visibility is what's causing the error...

[rector-laravel](https://github.com/driftingly/rector-laravel) can now automatically make model attributes and scopes `protected` for you: https://github.com/driftingly/rector-laravel/pull/370

See previous attempt: https://github.com/larastan/larastan/pull/1907

I may have already fixed this, can you try my fork to see what the result is? https://github.com/calebdw/larastan

This should be: ```php /** * @return BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class); } ```