-
-
Notifications
You must be signed in to change notification settings - Fork 437
Closed
Labels
Description
So:
+/**
+ * @return Collection<int, Bar>
+ */
public function getBars(): Collection
{
}The @return will aid auto-completion and is more correct than saying @return Bar[], which is what we do currently:
maker-bundle/src/Util/ClassSourceManipulator.php
Lines 604 to 610 in 884f10d
| $this->addGetter( | |
| $relation->getPropertyName(), | |
| $collectionTypeHint, | |
| false, | |
| // add @return that advertises this as a collection of specific objects | |
| [sprintf('@return %s|%s[]', $collectionTypeHint, $typeHint)] | |
| ); |