You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Training entity's ID is a string, so the Trainer::$trainings collection when indexed by ID (note the indexBy: "id" property), should have the Collection<string, Training> type rather than Collection<int, Training>.
So the point is that collections don't always have integer keys as it's hardcoded now, and it would be great to either properly determine their key type or skip the key definition at all (just use Collection<Training>)
The text was updated successfully, but these errors were encountered:
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/557ea3f4-d855-4f40-bc78-cdd3f46bebb0
Responsible rules
AddReturnDocBlockToCollectionPropertyGetterByToManyAnnotationRector
ExplicitRelationCollectionRector
Expected Behavior
The
Training
entity's ID is a string, so theTrainer::$trainings
collection when indexed by ID (note theindexBy: "id"
property), should have theCollection<string, Training>
type rather thanCollection<int, Training>
.So the point is that collections don't always have integer keys as it's hardcoded now, and it would be great to either properly determine their key type or skip the key definition at all (just use
Collection<Training>
)The text was updated successfully, but these errors were encountered: