laravel-ide-helper
laravel-ide-helper copied to clipboard
Add support for attribute accessors without return type declared in closures
Summary
Enable the recognition of attributes without any return type in the declared closures.
The following example was not recognized before:
protected function attributeWithoutReturnTypes(): Attribute
{
return new Attribute(
function (?string $name) {
return $name;
},
function (?string $name) {
return $name === null ? null : ucfirst($name);
}
);
}
Now the aforementioned method should produce the following declaration:
* @property mixed $attribute_without_return_types
Type of change
- [x] New feature (non-breaking change which adds functionality)
Checklist
- [x] Existing tests have been adapted and/or new tests have been added
- [x] Add a CHANGELOG.md entry
- [ ] Update the README.md
- [x] Code style has been fixed via
composer fix-style
Is this fixed with https://github.com/barryvdh/laravel-ide-helper/pull/1411 ?