lint/laravel/add-new-relation-generics
In the lint-strict preset. In Rector’s rector-laravel/laravel-type-declarations set. Needs the laravel extension. Unsafe fix: it can change behavior.
What it does
Add generic return type to relations in child of Illuminate\Database\Eloquent\Model
Configuration
[lint.rules]
"laravel/add-new-relation-generics" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
AddNewGenericReturnTypeToRelations(rector-laravel)