-
-
Couldn't load subscription status.
- Fork 1.2k
Open
Labels
Description
Versions:
- ide-helper Version: 2.12.2
- Laravel Version: 9.0.0
- PHP Version: 8.1.2
Description:
PR #1289 added support for the new attribute mutator/accessor format, but calculated properties/attributes aren't recognised yet.
Steps To Reproduce:
This example calculated property results in * @property-read string $full_name:
public function getFullNameAttribute(): string
{
return "$this->first_name $this->last_name";
}The following example is not recognised and does not add the same @property.
public function fullName(): Attribute
{
return Attribute::get(fn() => "$this->first_name $this->last_name");
}It should also result in (only) $fullName instead of $full_name.
The latter should also be protected instead of public of course, but that's a separate issue (#1293).
dmitry-ivanov, jomonkj, taha-moghaddam, lukas-pierce, KentarouTakeda and 6 more